@cat-factory/contracts 0.216.0 → 0.217.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.
@@ -25,6 +25,21 @@ export declare const capabilityCredentialEntrySchema: v.ObjectSchema<{
25
25
  readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
26
26
  }, undefined>;
27
27
  export type CapabilityCredentialEntry = v.InferOutput<typeof capabilityCredentialEntrySchema>;
28
+ /**
29
+ * Set ONE credential's value, leaving every other stored key sealed as it is.
30
+ *
31
+ * The whole-set PUT cannot serve an operator filling in a checklist. The client never received
32
+ * the values, so re-sending the set means re-typing every secret, and sending only the edited one
33
+ * REPLACES the set: a workspace that fills in its second credential silently deletes its first.
34
+ * The narrow write is the twin of the per-key delete, and for the same reason.
35
+ *
36
+ * The key rides the path, held to {@link capabilityCredentialKeySchema} there, so a reserved name
37
+ * is refused at this boundary rather than reaching the store.
38
+ */
39
+ export declare const setCapabilityCredentialSchema: v.ObjectSchema<{
40
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
41
+ }, undefined>;
42
+ export type SetCapabilityCredentialInput = v.InferOutput<typeof setCapabilityCredentialSchema>;
28
43
  /**
29
44
  * The non-secret projection of a stored credential — what the API returns and the UI lists.
30
45
  *
@@ -73,6 +88,11 @@ export declare const capabilityCredentialStatusSchema: v.ObjectSchema<{
73
88
  readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
74
89
  }, undefined>;
75
90
  export type CapabilityCredentialStatus = v.InferOutput<typeof capabilityCredentialStatusSchema>;
91
+ /**
92
+ * How many credentials one workspace may store. Exported because the per-KEY write has to hold
93
+ * the same ceiling as the whole-set PUT, and a second literal is a second number to keep in step.
94
+ */
95
+ export declare const MAX_CAPABILITY_CREDENTIALS = 100;
76
96
  /** Set/replace a workspace's capability credentials. Values write-only; keys unique. */
77
97
  export declare const upsertCapabilityCredentialsSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
78
98
  readonly entries: v.ArraySchema<v.ObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../src/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiC5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B,2ZAiBzC,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,+BAA+B;;;aAG1C,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B;;IAExC,2FAA2F;;aAE3F,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC;;IAE3C,mFAAmF;;;;;QAM/E,mFAAmF;;;IAIvF,uEAAuE;;IAEvE,iDAAiD;;IAEjD,6EAA6E;;aAE7E,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F,wFAAwF;AACxF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;wDAO7C,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,WAAW,CAC1D,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B;;;QA3C1C,mFAAmF;;;;;YAM/E,mFAAmF;;;QAIvF,uEAAuE;;QAEvE,iDAAiD;;QAEjD,6EAA6E;;;IA+B7E,qDAAqD;;;QAnErD,2FAA2F;;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CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F;;;GAGG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,wFAAwF;AACxF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;wDAU7C,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,WAAW,CAC1D,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B;;;QApD1C,mFAAmF;;;;;YAM/E,mFAAmF;;;QAIvF,uEAAuE;;QAEvE,iDAAiD;;QAEjD,6EAA6E;;;IAwC7E,qDAAqD;;;QA5ErD,2FAA2F;;;IA8E3F;;;;;;;OAOG;;IAEH;;;;;;;;;OASG;;aAEH,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F,gGAAgG;AAChG,eAAO,MAAM,iCAAiC;;;yBAA2C,CAAA;AACzF,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,yBAAyB,EAAE,CAE1F;AAED,6FAA6F;AAC7F,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,yBAAyB,EAAE,EACpC,SAAS,EAAE,MAAM,GAChB,uBAAuB,EAAE,CAE3B"}
@@ -49,6 +49,20 @@ export const capabilityCredentialEntrySchema = v.object({
49
49
  key: capabilityCredentialKeySchema,
50
50
  value: v.pipe(v.string(), v.minLength(1), v.maxLength(8192)),
51
51
  });
52
+ /**
53
+ * Set ONE credential's value, leaving every other stored key sealed as it is.
54
+ *
55
+ * The whole-set PUT cannot serve an operator filling in a checklist. The client never received
56
+ * the values, so re-sending the set means re-typing every secret, and sending only the edited one
57
+ * REPLACES the set: a workspace that fills in its second credential silently deletes its first.
58
+ * The narrow write is the twin of the per-key delete, and for the same reason.
59
+ *
60
+ * The key rides the path, held to {@link capabilityCredentialKeySchema} there, so a reserved name
61
+ * is refused at this boundary rather than reaching the store.
62
+ */
63
+ export const setCapabilityCredentialSchema = v.object({
64
+ value: v.pipe(v.string(), v.minLength(1), v.maxLength(8192)),
65
+ });
52
66
  /**
53
67
  * The non-secret projection of a stored credential — what the API returns and the UI lists.
54
68
  *
@@ -95,8 +109,13 @@ export const capabilityCredentialStatusSchema = v.object({
95
109
  /** When the stored value was last written. Absent when nothing is stored. */
96
110
  updatedAt: v.optional(v.number()),
97
111
  });
112
+ /**
113
+ * How many credentials one workspace may store. Exported because the per-KEY write has to hold
114
+ * the same ceiling as the whole-set PUT, and a second literal is a second number to keep in step.
115
+ */
116
+ export const MAX_CAPABILITY_CREDENTIALS = 100;
98
117
  /** Set/replace a workspace's capability credentials. Values write-only; keys unique. */
99
- export const upsertCapabilityCredentialsSchema = v.pipe(v.object({ entries: v.array(capabilityCredentialEntrySchema) }), v.check((o) => new Set(o.entries.map((e) => e.key)).size === o.entries.length, 'capability credential keys must be unique within a workspace'), v.check((o) => o.entries.length <= 100, 'at most 100 capability credentials per workspace'));
118
+ export const upsertCapabilityCredentialsSchema = v.pipe(v.object({ entries: v.array(capabilityCredentialEntrySchema) }), v.check((o) => new Set(o.entries.map((e) => e.key)).size === o.entries.length, 'capability credential keys must be unique within a workspace'), v.check((o) => o.entries.length <= MAX_CAPABILITY_CREDENTIALS, `at most ${MAX_CAPABILITY_CREDENTIALS} capability credentials per workspace`));
100
119
  /**
101
120
  * What the credential surface returns: what this deployment's capabilities DECLARE joined to what
102
121
  * this workspace has STORED, plus any stored key nothing declares.
@@ -1 +1 @@
1
- {"version":3,"file":"capability-credentials.js","sourceRoot":"","sources":["../src/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,wBAAwB,CAAA;AAE/B,8EAA8E;AAC9E,2FAA2F;AAC3F,kCAAkC;AAClC,EAAE;A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jB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC"}
@@ -1,144 +1,201 @@
1
1
  import { ContractNoBody } from '@toad-contracts/valibot';
2
+ import * as v from 'valibot';
2
3
  export declare const getCapabilityCredentialsContract: {
3
4
  readonly method: "get";
4
5
  readonly pathResolver: () => string;
5
6
  readonly responsesByStatusCode: {
6
- readonly '4xx': import("valibot").ObjectSchema<{
7
- readonly error: import("valibot").ObjectSchema<{
8
- readonly code: import("valibot").StringSchema<undefined>;
9
- readonly message: import("valibot").StringSchema<undefined>;
10
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
11
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
12
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
13
- readonly message: import("valibot").StringSchema<undefined>;
7
+ readonly '4xx': v.ObjectSchema<{
8
+ readonly error: v.ObjectSchema<{
9
+ readonly code: v.StringSchema<undefined>;
10
+ readonly message: v.StringSchema<undefined>;
11
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
12
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
13
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
14
+ readonly message: v.StringSchema<undefined>;
14
15
  }, undefined>, undefined>, undefined>;
15
16
  }, undefined>;
16
17
  }, undefined>;
17
- readonly '5xx': import("valibot").ObjectSchema<{
18
- readonly error: import("valibot").ObjectSchema<{
19
- readonly code: import("valibot").StringSchema<undefined>;
20
- readonly message: import("valibot").StringSchema<undefined>;
21
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
22
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
23
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
24
- readonly message: import("valibot").StringSchema<undefined>;
18
+ readonly '5xx': v.ObjectSchema<{
19
+ readonly error: v.ObjectSchema<{
20
+ readonly code: v.StringSchema<undefined>;
21
+ readonly message: v.StringSchema<undefined>;
22
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
23
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
24
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
25
+ readonly message: v.StringSchema<undefined>;
25
26
  }, undefined>, undefined>, undefined>;
26
27
  }, undefined>;
27
28
  }, undefined>;
28
- readonly 200: import("valibot").ObjectSchema<{
29
- readonly declared: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
30
- readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 128, undefined>, import("valibot").RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>]>;
31
- readonly declaredBy: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
32
- readonly subject: import("valibot").PicklistSchema<["tool-server", "binary-generator"], undefined>;
33
- readonly id: import("valibot").StringSchema<undefined>;
34
- readonly label: import("valibot").StringSchema<undefined>;
35
- readonly usage: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
29
+ readonly 200: v.ObjectSchema<{
30
+ readonly declared: v.ArraySchema<v.ObjectSchema<{
31
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
32
+ readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
33
+ readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
34
+ readonly id: v.StringSchema<undefined>;
35
+ readonly label: v.StringSchema<undefined>;
36
+ readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
36
37
  }, undefined>, undefined>;
37
- readonly required: import("valibot").BooleanSchema<undefined>;
38
- readonly stored: import("valibot").BooleanSchema<undefined>;
39
- readonly updatedAt: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
38
+ readonly required: v.BooleanSchema<undefined>;
39
+ readonly stored: v.BooleanSchema<undefined>;
40
+ readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
40
41
  }, undefined>, undefined>;
41
- readonly orphaned: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
42
- readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 128, undefined>, import("valibot").RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>]>;
43
- readonly updatedAt: import("valibot").NumberSchema<undefined>;
42
+ readonly orphaned: v.ArraySchema<v.ObjectSchema<{
43
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
44
+ readonly updatedAt: v.NumberSchema<undefined>;
44
45
  }, undefined>, undefined>;
45
- readonly environmentFallback: import("valibot").BooleanSchema<undefined>;
46
- readonly declarationsIncomplete: import("valibot").BooleanSchema<undefined>;
46
+ readonly environmentFallback: v.BooleanSchema<undefined>;
47
+ readonly declarationsIncomplete: v.BooleanSchema<undefined>;
47
48
  }, undefined>;
48
49
  };
49
50
  };
50
51
  export declare const setCapabilityCredentialsContract: {
51
52
  readonly method: "put";
52
53
  readonly pathResolver: () => string;
53
- readonly requestBodySchema: import("valibot").SchemaWithPipe<readonly [import("valibot").ObjectSchema<{
54
- readonly entries: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
55
- readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 128, undefined>, import("valibot").RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>]>;
56
- readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 8192, undefined>]>;
54
+ readonly requestBodySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
55
+ readonly entries: v.ArraySchema<v.ObjectSchema<{
56
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
57
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
57
58
  }, undefined>, undefined>;
58
- }, undefined>, import("valibot").CheckAction<{
59
+ }, undefined>, v.CheckAction<{
59
60
  entries: {
60
61
  key: string;
61
62
  value: string;
62
63
  }[];
63
- }, "capability credential keys must be unique within a workspace">, import("valibot").CheckAction<{
64
+ }, "capability credential keys must be unique within a workspace">, v.CheckAction<{
64
65
  entries: {
65
66
  key: string;
66
67
  value: string;
67
68
  }[];
68
69
  }, "at most 100 capability credentials per workspace">]>;
69
70
  readonly responsesByStatusCode: {
70
- readonly '4xx': import("valibot").ObjectSchema<{
71
- readonly error: import("valibot").ObjectSchema<{
72
- readonly code: import("valibot").StringSchema<undefined>;
73
- readonly message: import("valibot").StringSchema<undefined>;
74
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
75
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
76
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
77
- readonly message: import("valibot").StringSchema<undefined>;
71
+ readonly '4xx': v.ObjectSchema<{
72
+ readonly error: v.ObjectSchema<{
73
+ readonly code: v.StringSchema<undefined>;
74
+ readonly message: v.StringSchema<undefined>;
75
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
76
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
77
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
78
+ readonly message: v.StringSchema<undefined>;
78
79
  }, undefined>, undefined>, undefined>;
79
80
  }, undefined>;
80
81
  }, undefined>;
81
- readonly '5xx': import("valibot").ObjectSchema<{
82
- readonly error: import("valibot").ObjectSchema<{
83
- readonly code: import("valibot").StringSchema<undefined>;
84
- readonly message: import("valibot").StringSchema<undefined>;
85
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
86
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
87
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
88
- readonly message: import("valibot").StringSchema<undefined>;
82
+ readonly '5xx': v.ObjectSchema<{
83
+ readonly error: v.ObjectSchema<{
84
+ readonly code: v.StringSchema<undefined>;
85
+ readonly message: v.StringSchema<undefined>;
86
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
87
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
88
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
89
+ readonly message: v.StringSchema<undefined>;
89
90
  }, undefined>, undefined>, undefined>;
90
91
  }, undefined>;
91
92
  }, undefined>;
92
- readonly 200: import("valibot").ObjectSchema<{
93
- readonly declared: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
94
- readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 128, undefined>, import("valibot").RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>]>;
95
- readonly declaredBy: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
96
- readonly subject: import("valibot").PicklistSchema<["tool-server", "binary-generator"], undefined>;
97
- readonly id: import("valibot").StringSchema<undefined>;
98
- readonly label: import("valibot").StringSchema<undefined>;
99
- readonly usage: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
93
+ readonly 200: v.ObjectSchema<{
94
+ readonly declared: v.ArraySchema<v.ObjectSchema<{
95
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
96
+ readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
97
+ readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
98
+ readonly id: v.StringSchema<undefined>;
99
+ readonly label: v.StringSchema<undefined>;
100
+ readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
100
101
  }, undefined>, undefined>;
101
- readonly required: import("valibot").BooleanSchema<undefined>;
102
- readonly stored: import("valibot").BooleanSchema<undefined>;
103
- readonly updatedAt: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
102
+ readonly required: v.BooleanSchema<undefined>;
103
+ readonly stored: v.BooleanSchema<undefined>;
104
+ readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
104
105
  }, undefined>, undefined>;
105
- readonly orphaned: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
106
- readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 128, undefined>, import("valibot").RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>, import("valibot").CheckAction<string, (issue: import("valibot").CheckIssue<string>) => string>]>;
107
- readonly updatedAt: import("valibot").NumberSchema<undefined>;
106
+ readonly orphaned: v.ArraySchema<v.ObjectSchema<{
107
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
108
+ readonly updatedAt: v.NumberSchema<undefined>;
108
109
  }, undefined>, undefined>;
109
- readonly environmentFallback: import("valibot").BooleanSchema<undefined>;
110
- readonly declarationsIncomplete: import("valibot").BooleanSchema<undefined>;
110
+ readonly environmentFallback: v.BooleanSchema<undefined>;
111
+ readonly declarationsIncomplete: v.BooleanSchema<undefined>;
112
+ }, undefined>;
113
+ };
114
+ };
115
+ export declare const setCapabilityCredentialContract: {
116
+ readonly method: "put";
117
+ readonly requestPathParamsSchema: v.ObjectSchema<{
118
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
119
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
120
+ readonly pathResolver: ({ key }: {
121
+ key: string;
122
+ }) => string;
123
+ readonly requestBodySchema: v.ObjectSchema<{
124
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
125
+ }, undefined>;
126
+ readonly responsesByStatusCode: {
127
+ readonly '4xx': v.ObjectSchema<{
128
+ readonly error: v.ObjectSchema<{
129
+ readonly code: v.StringSchema<undefined>;
130
+ readonly message: v.StringSchema<undefined>;
131
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
132
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
133
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
134
+ readonly message: v.StringSchema<undefined>;
135
+ }, undefined>, undefined>, undefined>;
136
+ }, undefined>;
137
+ }, undefined>;
138
+ readonly '5xx': v.ObjectSchema<{
139
+ readonly error: v.ObjectSchema<{
140
+ readonly code: v.StringSchema<undefined>;
141
+ readonly message: v.StringSchema<undefined>;
142
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
143
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
144
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
145
+ readonly message: v.StringSchema<undefined>;
146
+ }, undefined>, undefined>, undefined>;
147
+ }, undefined>;
148
+ }, undefined>;
149
+ readonly 200: v.ObjectSchema<{
150
+ readonly declared: v.ArraySchema<v.ObjectSchema<{
151
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
152
+ readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
153
+ readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
154
+ readonly id: v.StringSchema<undefined>;
155
+ readonly label: v.StringSchema<undefined>;
156
+ readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
157
+ }, undefined>, undefined>;
158
+ readonly required: v.BooleanSchema<undefined>;
159
+ readonly stored: v.BooleanSchema<undefined>;
160
+ readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
161
+ }, undefined>, undefined>;
162
+ readonly orphaned: v.ArraySchema<v.ObjectSchema<{
163
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
164
+ readonly updatedAt: v.NumberSchema<undefined>;
165
+ }, undefined>, undefined>;
166
+ readonly environmentFallback: v.BooleanSchema<undefined>;
167
+ readonly declarationsIncomplete: v.BooleanSchema<undefined>;
111
168
  }, undefined>;
112
169
  };
113
170
  };
114
171
  export declare const deleteCapabilityCredentialContract: {
115
172
  readonly method: "delete";
116
- readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
117
- key: import("valibot").StringSchema<undefined>;
173
+ readonly requestPathParamsSchema: v.ObjectSchema<{
174
+ key: v.StringSchema<undefined>;
118
175
  }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
119
176
  readonly pathResolver: ({ key }: {
120
177
  key: string;
121
178
  }) => string;
122
179
  readonly responsesByStatusCode: {
123
- readonly '4xx': import("valibot").ObjectSchema<{
124
- readonly error: import("valibot").ObjectSchema<{
125
- readonly code: import("valibot").StringSchema<undefined>;
126
- readonly message: import("valibot").StringSchema<undefined>;
127
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
128
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
129
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
130
- readonly message: import("valibot").StringSchema<undefined>;
180
+ readonly '4xx': v.ObjectSchema<{
181
+ readonly error: v.ObjectSchema<{
182
+ readonly code: v.StringSchema<undefined>;
183
+ readonly message: v.StringSchema<undefined>;
184
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
185
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
186
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
187
+ readonly message: v.StringSchema<undefined>;
131
188
  }, undefined>, undefined>, undefined>;
132
189
  }, undefined>;
133
190
  }, undefined>;
134
- readonly '5xx': import("valibot").ObjectSchema<{
135
- readonly error: import("valibot").ObjectSchema<{
136
- readonly code: import("valibot").StringSchema<undefined>;
137
- readonly message: import("valibot").StringSchema<undefined>;
138
- readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
139
- readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
140
- readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
141
- readonly message: import("valibot").StringSchema<undefined>;
191
+ readonly '5xx': v.ObjectSchema<{
192
+ readonly error: v.ObjectSchema<{
193
+ readonly code: v.StringSchema<undefined>;
194
+ readonly message: v.StringSchema<undefined>;
195
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
196
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
197
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
198
+ readonly message: v.StringSchema<undefined>;
142
199
  }, undefined>, undefined>, undefined>;
143
200
  }, undefined>;
144
201
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAkB3E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3C,CAAA;AAMF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK7C,CAAA"}
1
+ {"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAoB5B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3C,CAAA;AAOF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM1C,CAAA;AAQF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK7C,CAAA"}
@@ -1,5 +1,6 @@
1
- import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
2
- import { capabilityCredentialsViewSchema, upsertCapabilityCredentialsSchema, } from '../capability-credentials.js';
1
+ import { ContractNoBody, defineApiContract, withObjectKeys } from '@toad-contracts/valibot';
2
+ import * as v from 'valibot';
3
+ import { capabilityCredentialKeySchema, capabilityCredentialsViewSchema, setCapabilityCredentialSchema, upsertCapabilityCredentialsSchema, } from '../capability-credentials.js';
3
4
  import { errorResponses, singleStringParam } from './_shared.js';
4
5
  // ---------------------------------------------------------------------------
5
6
  // Per-workspace CAPABILITY CREDENTIAL route contracts. Mounted under
@@ -21,10 +22,24 @@ export const setCapabilityCredentialsContract = defineApiContract({
21
22
  requestBodySchema: upsertCapabilityCredentialsSchema,
22
23
  responsesByStatusCode: { 200: capabilityCredentialsViewSchema, ...errorResponses },
23
24
  });
24
- // A per-KEY delete beside the whole-set PUT, because the two are different operations for an
25
- // operator: the PUT replaces the set (what a form submit does), while removing one orphaned
26
- // credential must not require re-sending every other value which the client cannot do, since
27
- // it never received them.
25
+ // A per-KEY write beside the whole-set PUT. The set-replacing PUT is the API caller's operation
26
+ // (declare the whole set in one call); a UI filling in a CHECKLIST edits one key at a time and
27
+ // cannot use it, because it never received the other values: re-sending the set would mean
28
+ // re-typing every secret, and sending only the edited key would delete the rest. The key is
29
+ // held to the credential-key schema here, so a reserved name is refused before the store sees it.
30
+ export const setCapabilityCredentialContract = defineApiContract({
31
+ method: 'put',
32
+ requestPathParamsSchema: withObjectKeys(v.object({ key: capabilityCredentialKeySchema })),
33
+ pathResolver: ({ key }) => `/capability-credentials/${key}`,
34
+ requestBodySchema: setCapabilityCredentialSchema,
35
+ responsesByStatusCode: { 200: capabilityCredentialsViewSchema, ...errorResponses },
36
+ });
37
+ // A per-KEY delete for the same reason, and the operation that makes an ORPHANED credential
38
+ // removable at all: removing one stored key must not require re-sending every other value.
39
+ // Deliberately LOOSE on the key (a bare string, not the credential-key schema the PUT holds):
40
+ // what a delete targets is whatever is ALREADY STORED, and an orphan written before a rule
41
+ // tightened (or under a rule a newer build added) must stay removable, or the invalid row is
42
+ // exactly the one nothing can clean up.
28
43
  export const deleteCapabilityCredentialContract = defineApiContract({
29
44
  method: 'delete',
30
45
  requestPathParamsSchema: keyParams,
@@ -1 +1 @@
1
- {"version":3,"file":"capability-credentials.js","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,qEAAqE;AACrE,6EAA6E;AAC7E,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,kEAAkE;AAClE,8EAA8E;AAE9E,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAE1C,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAChE,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,yBAAyB;IAC7C,qBAAqB,EAAE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAChE,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,yBAAyB;IAC7C,iBAAiB,EAAE,iCAAiC;IACpD,qBAAqB,EAAE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,6FAA6F;AAC7F,4FAA4F;AAC5F,+FAA+F;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+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,gGAAgG;AAChG,+FAA+F;AAC/F,2FAA2F;AAC3F,4FAA4F;AAC5F,kGAAkG;AAClG,MAAM,CAAC,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;IAC/D,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,6BAA6B,EAAE,CAAC,CAAC;IACzF,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,2BAA2B,GAAG,EAAE;IAC3D,iBAAiB,EAAE,6BAA6B;IAChD,qBAAqB,EAAE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,4FAA4F;AAC5F,2FAA2F;AAC3F,8FAA8F;AAC9F,2FAA2F;AAC3F,6FAA6F;AAC7F,wCAAwC;AACxC,MAAM,CAAC,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;IAClE,MAAM,EAAE,QAAQ;IAChB,uBAAuB,EAAE,SAAS;IAClC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,2BAA2B,GAAG,EAAE;IAC3D,qBAAqB,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;CAClE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.216.0",
3
+ "version": "0.217.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",