@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
20 lines (19 loc) • 750 B
TypeScript
/**
* Shape check for an id that becomes a file name or a key segment.
*
* The same rule `isSafeArtifactId` applies to model-supplied artifact ids,
* widened by `.` for host-registered skill ids: one leading alphanumeric, then
* up to 127 of `[A-Za-z0-9._-]`. Nothing that could be a path separator, a
* traversal segment (a leading `.` is refused, so `..` cannot start one), a
* glob metacharacter or a line break gets through.
*
* @module utils/safeStoreId
*/
/** Whether `id` may be joined into a path or a key. */
export declare function isSafeStoreId(id: string): boolean;
/**
* Refuse an unsafe id.
*
* @throws {Error} with `code: "INVALID_STORE_ID"`
*/
export declare function assertSafeStoreId(id: string, label: string): void;