@civitai/app-sdk 0.82.0 → 0.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,7 @@ export { isModelSlotContext, isPageSlotContext } from './types.js';
116
116
  * in `types.ts` for which of the two it uses and why.
117
117
  */
118
118
  export { isSignedIn } from './types.js';
119
- export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockTextToImageParams, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
119
+ export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockTextToImageParams, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
120
120
  /**
121
121
  * Host bounds for an inline `customComfy` graph, mirrored from civitai/civitai —
122
122
  * see `WorkflowBodyCustomComfyInline.workflow`.
@@ -2793,11 +2793,44 @@ export type BlockStorageMigrationOp = {
2793
2793
  path: string;
2794
2794
  keyword: BlockStorageMigrationKeyword;
2795
2795
  };
2796
+ /**
2797
+ * RESERVED — civitai.com refuses this field until permission hooks are enabled,
2798
+ * so do not declare it yet. A collection's permission hook: one ES module of the
2799
+ * bundle whose default export decides, for every write to the collection,
2800
+ * whether the write is allowed. It runs after the collection `schema` check,
2801
+ * never instead of it. Mirrors the canonical schema's
2802
+ * `$defs.storageCollectionHook`; this package adds no hook behaviour.
2803
+ *
2804
+ * Checked by the server, not by the schema: whether `file` is inside
2805
+ * `outputDir`, whether it exists in the bundle with this `sha256`, its size (one
2806
+ * self-contained module with no imports, at most 65536 bytes of UTF-8 text),
2807
+ * and two collections pinning one file with different digests.
2808
+ */
2809
+ export interface BlockStorageCollectionHook {
2810
+ /**
2811
+ * The hook's relative path in the submitted bundle, shipped verbatim (a
2812
+ * committed source file, not a build output): `/`-separated segments, each
2813
+ * starting with a letter, digit, `_` or `-` and then letters, digits, `_`, `.`
2814
+ * or `-` (so no `.` or `..` segment, no hidden file, no leading `/`), ending
2815
+ * `.js` or `.mjs`, at most 200 characters, with no `node_modules` segment.
2816
+ * Pattern `^([A-Za-z0-9_-][A-Za-z0-9_.-]*\/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\.m?js$`.
2817
+ */
2818
+ file: string;
2819
+ /**
2820
+ * The SHA-256 of the file's bytes as 64 lowercase hex characters
2821
+ * (`^[0-9a-f]{64}$`). Submit, the git-push path and approve each refuse a
2822
+ * version whose file is missing or does not match it. One file used by several
2823
+ * collections must be pinned with the same digest in each.
2824
+ */
2825
+ sha256: string;
2826
+ /** The most milliseconds one call may take: an integer from 1 to 500. Omitted means 50. */
2827
+ timeoutMs?: number;
2828
+ }
2796
2829
  /**
2797
2830
  * A PRIVATE collection — a separate key space per viewer, read and written
2798
2831
  * only by that viewer. Carries none of the shared-only fields (`write`,
2799
2832
  * `counters`, `marks`, `showAuthor`, `dailyWritesPerAuthor`,
2800
- * `ownedModelVersions`); the canonical
2833
+ * `ownedModelVersions`, `registry`); the canonical
2801
2834
  * forbids them here. See {@link BlockStorageSharedCollectionDeclaration} for
2802
2835
  * the fields both kinds share.
2803
2836
  */
@@ -2818,6 +2851,8 @@ export interface BlockStoragePrivateCollectionDeclaration {
2818
2851
  schema?: BlockStorageCollectionSchema;
2819
2852
  /** See {@link BlockStorageSharedCollectionDeclaration.migrations}. */
2820
2853
  migrations?: BlockStorageMigrationOp[];
2854
+ /** RESERVED — see {@link BlockStorageSharedCollectionDeclaration.hook}. */
2855
+ hook?: BlockStorageCollectionHook;
2821
2856
  }
2822
2857
  /**
2823
2858
  * A SHARED collection — one key space for the whole app, read by every viewer
@@ -2918,6 +2953,16 @@ export interface BlockStorageSharedCollectionDeclaration {
2918
2953
  * `false` refuses every import of it with 403 `not_exportable`.
2919
2954
  */
2920
2955
  exportable?: boolean;
2956
+ /**
2957
+ * RESERVED — civitai.com refuses this field until publishing to registries
2958
+ * is enabled, so do not declare it yet. Shared collections only.
2959
+ * `'public'` publishes the collection's visible shared documents, read-only,
2960
+ * to every registry that follows Civitai's apps, as entities of the
2961
+ * collection's schema; hidden documents and every private document never
2962
+ * leave. Absent (the default): the collection is not published. A moderator
2963
+ * sees the change at review.
2964
+ */
2965
+ registry?: 'public';
2921
2966
  /**
2922
2967
  * The schema every document's `data` must match — see {@link BlockStorageCollectionSchema}.
2923
2968
  * Not allowed with `write` `'none'` (no document bodies are written there).
@@ -2929,6 +2974,14 @@ export interface BlockStorageSharedCollectionDeclaration {
2929
2974
  * {@link BlockStorageMigrationOp}. Not allowed with `write` `'none'`.
2930
2975
  */
2931
2976
  migrations?: BlockStorageMigrationOp[];
2977
+ /**
2978
+ * RESERVED — civitai.com refuses this field until permission hooks are
2979
+ * enabled, so do not declare it yet. A permission hook that decides, for every
2980
+ * write to this collection, whether it is allowed — see
2981
+ * {@link BlockStorageCollectionHook}. Allowed on every collection kind,
2982
+ * private and shared alike.
2983
+ */
2984
+ hook?: BlockStorageCollectionHook;
2932
2985
  }
2933
2986
  /**
2934
2987
  * One collection declaration — see {@link BlockManifestV1.storage}.
package/dist/index.d.ts CHANGED
@@ -25,11 +25,11 @@
25
25
  *
26
26
  * - **`./blocks`** — importing it RUNS `./safe-storage` for its side effect
27
27
  * (repairing `localStorage`/`sessionStorage` at an opaque origin). Folding
28
- * 213 symbols and that side effect into the root would make every OAuth app
28
+ * 214 symbols and that side effect into the root would make every OAuth app
29
29
  * that writes `import { exchangeCode } from '@civitai/app-sdk'` pay for the
30
30
  * Civitai-Apps contract it does not use. Blocks and OAuth apps are disjoint
31
31
  * audiences; see this package's README.
32
- * 🔴 That 213 is ASSERTED, not merely quoted — by
32
+ * 🔴 That 214 is ASSERTED, not merely quoted — by
33
33
  * `packages/civitai-app-sdk/test/export-surface.test.ts`, which pins
34
34
  * `surface.get('./blocks').size`. It said 119 here against a real 125 until
35
35
  * 2026-10-04, because the existing checks pin the root as an exact union and
package/dist/index.js CHANGED
@@ -25,11 +25,11 @@
25
25
  *
26
26
  * - **`./blocks`** — importing it RUNS `./safe-storage` for its side effect
27
27
  * (repairing `localStorage`/`sessionStorage` at an opaque origin). Folding
28
- * 213 symbols and that side effect into the root would make every OAuth app
28
+ * 214 symbols and that side effect into the root would make every OAuth app
29
29
  * that writes `import { exchangeCode } from '@civitai/app-sdk'` pay for the
30
30
  * Civitai-Apps contract it does not use. Blocks and OAuth apps are disjoint
31
31
  * audiences; see this package's README.
32
- * 🔴 That 213 is ASSERTED, not merely quoted — by
32
+ * 🔴 That 214 is ASSERTED, not merely quoted — by
33
33
  * `packages/civitai-app-sdk/test/export-surface.test.ts`, which pins
34
34
  * `surface.get('./blocks').size`. It said 119 here against a real 125 until
35
35
  * 2026-10-04, because the existing checks pin the root as an exact union and
@@ -149,9 +149,11 @@ export const KNOWN_GAPS = {
149
149
  '`apps:storage:import` (and `apps:storage`), requesting any of these scopes with nothing for ' +
150
150
  'it to reach is rejected, an import never names this app itself and names each source at ' +
151
151
  'most once, a counter may not share a name with a mark, and the ' +
152
- 'RESERVED features (`kind` "log", `ttlSeconds`, `dailyWritesPerAuthor`, `write` "anyone" / ' +
153
- '"owner") validate offline and are refused at submit. Ajv enforces the structural rules ' +
154
- 'exactly; these are server-side.',
152
+ 'RESERVED features (`kind` "log", `ttlSeconds`, `dailyWritesPerAuthor`, `registry`, `hook`, ' +
153
+ '`write` "anyone" / "owner") validate offline and are refused at submit. A `hook`\'s `file` ' +
154
+ 'being outside `outputDir`, present in the bundle with its `sha256`, its size, and one file ' +
155
+ 'pinned with one digest across collections are checked by the server too. Ajv enforces the ' +
156
+ 'structural rules exactly; these are server-side.',
155
157
  'storage-collection-schema-server-only-rules': 'A collection `schema` (civitai/civitai#7491): the canonical encodes the keyword subset, each ' +
156
158
  'keyword\'s shape, the 256-character `pattern` bound, "a pattern needs a maxLength of at most ' +
157
159
  '1000" and "no schema on write none", and Ajv enforces those exactly. It states in prose only ' +
@@ -15,5 +15,5 @@
15
15
  export { defineBlock, SCHEMA_DIVERGENCES, KNOWN_GAPS, loadCanonicalSchema } from './defineBlock.js';
16
16
  export type { DefineBlockConfig } from './defineBlock.js';
17
17
  export { BlockManifestError } from '../blocks/manifestError.js';
18
- export type { BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockStorageCollectionDeclaration, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, } from '../blocks/types.js';
18
+ export type { BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, } from '../blocks/types.js';
19
19
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.82.0",
3
+ "version": "0.84.0",
4
4
  "description": "OAuth + PKCE, encrypted-cookie sessions, scopes, and orchestrator helpers for building third-party Civitai apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -503,6 +503,10 @@
503
503
  "type": "boolean",
504
504
  "description": "Whether other apps may reach this collection through their `storage.imports` (with the viewer's consent). Default true; false refuses every import of it with 403 `not_exportable`."
505
505
  },
506
+ "registry": {
507
+ "enum": ["public"],
508
+ "description": "RESERVED — civitai.com refuses this field until publishing to registries is enabled, so do not declare it yet. Shared collections only. \"public\" publishes the collection's visible shared documents, read-only, to every registry that follows Civitai's apps, as entities of the collection's schema; hidden documents and every private document never leave. Absent (the default): the collection is not published. A moderator sees the change at review."
509
+ },
506
510
  "ownedModelVersions": {
507
511
  "type": "array",
508
512
  "description": "Shared collections with `write` \"own\" only. Fields of a document's `data` that, when present, must hold a Civitai model version id owned by the viewer writing the document — for example [\"/workflow/modelVersionId\"] for a collection where viewers publish their own workflows. Each entry is a pointer of 1 to 4 segments, each \"/\" then a letter or _ followed by up to 63 letters, digits or _; 1 to 4 distinct pointers. A pointer names one field of nested objects: it never indexes into an array, and a step through an array or any other non-object finds nothing. On every create and update the server resolves each pointer in the new `data`: a field that is absent is allowed; a field that is present must be a positive integer naming a model version whose model the writer owns, and is otherwise refused with 403 `resource_not_owned` — a version that is someone else's, missing or deleted, and a value that is not a positive integer, are all refused the same way. The check runs before moderation and before any write budget is spent. Ownership is checked when a document is written, not afterwards: if the model later changes hands or is deleted, documents already stored keep the id.",
@@ -515,7 +519,7 @@
515
519
  }
516
520
  },
517
521
  "schema": {
518
- "description": "Optional. A JSON Schema SUBSET that every document's `data` in this collection must match. The server checks it on every create and update and refuses a document that does not match with 400 `schema_violation`, whose message names the first failing JSON pointer into `data` (for example \"/title\"); counters and marks are not checked. Without a schema, documents are not checked. Supported keywords only: type (object, array, string, number, integer, boolean, null, or an array of them), properties, required, additionalProperties (true, false or a schema), items (one schema for every element), enum, const, minLength, maxLength, pattern, minimum, maximum, minItems, maxItems and description; any other keyword is refused at submit with a message naming it. Keywords that do not apply to a value's type are ignored; string lengths count code points; `pattern` is a JavaScript regular expression (the \"u\" flag), unanchored, of at most 256 characters, and a schema with a `pattern` must also declare a `maxLength` of at most 1000; a pattern that can backtrack catastrophically (analysed with the \"u\" flag, as the store runs it) is refused at submit. At most 16 patterns per schema and 32 across all of the manifest's collection schemas together, schemas nested at most 16 deep, and at most 16384 bytes of JSON. Not allowed on a `write` \"none\" collection. Changing a schema does not re-check documents already stored; they are checked when next written. A change that narrows the schema against the previous approved version (a newly required property; a type, enum, const, bound or pattern narrowed; `additionalProperties` closed or newly a schema; a declared property removed under `additionalProperties: false`; or a schema added where there was none) is refused at submit unless `migrations` covers it.",
522
+ "description": "Optional. A JSON Schema SUBSET that every document's `data` in this collection must match. The server checks it on every create and update and refuses a document that does not match with 400 `schema_violation`, whose message names the first failing JSON pointer into `data` (for example \"/title\"); counters and marks are not checked. Without a schema, documents are not checked. Supported keywords only: type (object, array, string, number, integer, boolean, null, or an array of them), properties, required, additionalProperties (true, false or a schema), items (one schema for every element), enum, const, minLength, maxLength, pattern, minimum, maximum, minItems, maxItems and description; any other keyword is refused at submit with a message naming it. Keywords that do not apply to a value's type are ignored; string lengths count code points; `pattern` is a JavaScript regular expression (the \"u\" flag), unanchored, of at most 256 characters, and a schema with a `pattern` must also declare a `maxLength` of at most 1000; a pattern that can backtrack catastrophically (analysed with the \"u\" flag, as the store runs it) is refused at submit. At most 16 patterns per schema and 32 across all of the manifest's collection schemas together, schemas nested at most 16 deep, and at most 16384 bytes of JSON. Not allowed on a `write` \"none\" collection. A change that narrows the schema against the previous approved version (a newly required property; a type, enum, const, bound or pattern narrowed; `additionalProperties` closed or newly a schema; a declared property removed under `additionalProperties: false`; or a schema added where there was none) is refused at submit unless `migrations` covers it. The covering ops run over the documents already stored when the version is approved; a document an \"acknowledge\" op covers is left as stored and checked when next written.",
519
523
  "$ref": "#/$defs/storageCollectionSchema"
520
524
  },
521
525
  "migrations": {
@@ -524,6 +528,10 @@
524
528
  "minItems": 1,
525
529
  "maxItems": 32,
526
530
  "items": { "$ref": "#/$defs/storageMigrationOp" }
531
+ },
532
+ "hook": {
533
+ "description": "RESERVED — civitai.com refuses this field until permission hooks are enabled, so do not declare it yet. Optional. A permission hook: one ES module of the bundle whose default export decides, for every write to this collection, whether the write is allowed. It runs after the collection `schema` check, never instead of it. `file` is the hook's path in the submitted bundle, shipped verbatim — a committed source file, not a build output, so it must not be inside `outputDir` or `node_modules`; one self-contained module with no imports, at most 65536 bytes of UTF-8 text. `sha256` is the SHA-256 of that file's bytes as 64 lowercase hex characters: submit, the git-push path and approve each refuse a version whose file is missing or does not match it. `timeoutMs` is the most time one call may take, from 1 to 500 (omitted means 50). One file used by several collections must be pinned with the same sha256 in each.",
534
+ "$ref": "#/$defs/storageCollectionHook"
527
535
  }
528
536
  },
529
537
  "allOf": [
@@ -549,7 +557,8 @@
549
557
  "marks": false,
550
558
  "showAuthor": false,
551
559
  "dailyWritesPerAuthor": false,
552
- "ownedModelVersions": false
560
+ "ownedModelVersions": false,
561
+ "registry": false
553
562
  }
554
563
  }
555
564
  },
@@ -728,6 +737,32 @@
728
737
  },
729
738
  "storageCollectionSchemaType": {
730
739
  "enum": ["object", "array", "string", "number", "integer", "boolean", "null"]
740
+ },
741
+ "storageCollectionHook": {
742
+ "type": "object",
743
+ "description": "A collection's permission hook (see `storage.collections.<name>.hook`). Whether `file` is inside `outputDir`, whether it exists in the bundle with this sha256, its size, and two collections pinning one file with different digests are checked by the server, not by this schema.",
744
+ "additionalProperties": false,
745
+ "required": ["file", "sha256"],
746
+ "properties": {
747
+ "file": {
748
+ "type": "string",
749
+ "description": "The hook's relative path in the bundle: \"/\"-separated segments, each starting with a letter, digit, _ or - and then letters, digits, _, . or - (so no \".\" or \"..\" segment, no hidden file, no leading \"/\"), ending .js or .mjs, at most 200 characters, with no node_modules segment.",
750
+ "maxLength": 200,
751
+ "pattern": "^([A-Za-z0-9_-][A-Za-z0-9_.-]*/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\\.m?js$",
752
+ "not": { "pattern": "(^|/)node_modules(/|$)" }
753
+ },
754
+ "sha256": {
755
+ "type": "string",
756
+ "description": "The SHA-256 of the file's bytes, as 64 lowercase hex characters.",
757
+ "pattern": "^[0-9a-f]{64}$"
758
+ },
759
+ "timeoutMs": {
760
+ "type": "integer",
761
+ "description": "The most milliseconds one call of the hook may take, from 1 to 500. Omitted means 50.",
762
+ "minimum": 1,
763
+ "maximum": 500
764
+ }
765
+ }
731
766
  }
732
767
  },
733
768
  "allOf": [