@work-shape/catalyst-asset-schemas 0.8.0-rc.6 → 0.8.0-rc.7

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.
package/dist/index.d.ts CHANGED
@@ -51,6 +51,11 @@ interface AgentConfig {
51
51
  */
52
52
  knowledgeBases?: string[];
53
53
  initialPrompts: AgentInitialPromptConfig[];
54
+ /**
55
+ * An agent that ships with the platform: its fields as the release shipped them last. Only
56
+ * the release seed writes it; every other write keeps it as stored.
57
+ */
58
+ shipped?: Record<string, unknown>;
54
59
  }
55
60
  interface SkillConfig {
56
61
  name: string;
@@ -145,7 +150,11 @@ declare const FIRST_PARTY_AUTH_SCOPES: readonly ["*", "me:read", "me:delete", "c
145
150
  type ChatSessionAuthScope = (typeof CHAT_SESSION_AUTH_SCOPES)[number];
146
151
  type FirstPartyAuthScope = (typeof FIRST_PARTY_AUTH_SCOPES)[number];
147
152
  type OperationScope = Exclude<FirstPartyAuthScope, "*">;
148
- declare const ACTIONS: readonly ["agent.read", "agent.write", "agent.publish", "agent.delete", "skill.read", "skill.write", "skill.delete", "skill.approve", "connection.read", "connection.use", "connection.write", "connection.delete", "connection.approve", "app.read", "app.write", "app.publish", "app.approve", "app.delete", "app.use", "workflow.read", "workflow.write", "workflow.publish", "workflow.approve", "workflow.delete", "workflow.use", "workflow.read_run_data", "data_store.read", "data_store.write", "data_store.publish", "data_store.delete", "data_store.insert", "data_store.execute", "data_store.records", "knowledge_base.read", "knowledge_base.write", "knowledge_base.publish", "knowledge_base.delete", "knowledge_base.use", "mail_sender.use", "guardrail.read", "guardrail.write", "guardrail.publish", "guardrail.delete", "operations.approve", "feedback.review", "users.manage", "usage.view", "audit.view", "api_access.manage", "service_principals.manage", "agent_models.manage", "assets.release", "builder", "publisher"];
153
+ /**
154
+ * Every right of the platform, one file per domain under `contract-values/`. The order is kept:
155
+ * `GRANTABLE_ACTIONS` filters it, and the rights dialog lists rights in it.
156
+ */
157
+ declare const ACTIONS: readonly ["agent.read", "agent.write", "agent.publish", "agent.delete", "skill.read", "skill.write", "skill.delete", "skill.approve", "connection.read", "connection.use", "connection.write", "connection.delete", "connection.approve", "app.read", "app.write", "app.publish", "app.approve", "app.delete", "app.use", "workflow.read", "workflow.write", "workflow.publish", "workflow.approve", "workflow.delete", "workflow.use", "workflow.read_run_data", "data_store.read", "data_store.write", "data_store.publish", "data_store.delete", "data_store.insert", "data_store.execute", "data_store.records", "knowledge_base.read", "knowledge_base.write", "knowledge_base.publish", "knowledge_base.delete", "knowledge_base.use", "mail_sender.use", "guardrail.read", "guardrail.write", "guardrail.publish", "guardrail.delete", "operations.approve", "feedback.review", "users.manage", "usage.view", "audit.view", "api_access.manage", "service_principals.manage", "agent_models.manage", "roles.edit_built_in", "assets.release", "builder", "publisher"];
149
158
  type PlatformAction = (typeof ACTIONS)[number];
150
159
  type AppErrorCode = (typeof APP_ERROR_CODES)[number];
151
160
  /** The HTTP status every error code answers with. */
@@ -200,9 +209,9 @@ type GrantScopeKind = (typeof GRANT_SCOPE_KINDS)[number];
200
209
  /** Where a role's grant lies: the whole instance, one workspace or one asset. */
201
210
  declare const ROLE_GRANT_SCOPE_KINDS: readonly ["instance", "workspace", "asset"];
202
211
  type RoleGrantScopeKind = (typeof ROLE_GRANT_SCOPE_KINDS)[number];
203
- /** What a release did to an action of a built-in role's default that waits for a superadmin. */
212
+ /** What a release did to an action of a built-in role's default that waits for a decision. */
204
213
  declare const ROLE_PENDING_CHANGES: readonly ["added", "removed"];
205
- /** A superadmin's decision on a pending action: apply what the release did, or dismiss it. */
214
+ /** The decision on a pending action: apply what the release did, or dismiss it. */
206
215
  declare const ROLE_PENDING_DECISIONS: readonly ["apply", "dismiss"];
207
216
  type RolePendingDecision = (typeof ROLE_PENDING_DECISIONS)[number];
208
217
  declare const GRANT_EFFECTS: readonly ["allow", "deny"];
@@ -326,8 +335,10 @@ declare const ATTACHMENT_CREATE_OUTCOMES: readonly ["created", "already_availabl
326
335
  type AttachmentCreateOutcome = (typeof ATTACHMENT_CREATE_OUTCOMES)[number];
327
336
  declare const STRUCTURED_DATA_REVIEW_REASONS: readonly ["uncertain", "conflicting"];
328
337
  type StructuredDataReviewReason = (typeof STRUCTURED_DATA_REVIEW_REASONS)[number];
329
- declare const FOLLOW_UP_MODES: readonly ["queue"];
330
- declare const FOLLOW_UP_STATUSES: readonly ["pending", "dispatched", "cancelled"];
338
+ /** Queued: sent as the next turn. Steer: taken in by the author's own running turn (FU-2). */
339
+ declare const FOLLOW_UP_MODES: readonly ["queue", "steer"];
340
+ /** `consumed`: a steer the running turn took in; `dispatched`: started as a turn of its own. */
341
+ declare const FOLLOW_UP_STATUSES: readonly ["pending", "dispatched", "consumed", "cancelled"];
331
342
  declare const AGENT_RUN_STATUSES: readonly ["queued", "running", "waiting_for_decision", "waiting_for_subagents", "cancelling", "completed", "cancelled", "failed"];
332
343
  type AgentRunStatus = (typeof AGENT_RUN_STATUSES)[number];
333
344
  declare const AGENT_RUN_FAILURE_CATEGORIES: readonly ["app_error", "internal_error", "runtime_interrupted", "abort_error", "unknown_error"];
@@ -749,6 +760,7 @@ declare const agentConfigSchema: z.ZodObject<{
749
760
  de: z.ZodOptional<z.ZodString>;
750
761
  }, z.core.$strict>]>;
751
762
  }, z.core.$strip>>>;
763
+ shipped: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
752
764
  }, z.core.$strip>;
753
765
  /** The id of a Workflow, which is the name of its asset: part of `workflow.<id>.start`. */
754
766
  declare const WORKFLOW_NAME_PATTERN: RegExp;
package/dist/index.js CHANGED
@@ -15,93 +15,99 @@ var SKILL_RESOURCE_MEDIA_TYPES = [
15
15
  ];
16
16
  var APP_AUDIENCES = ["self", "workspace", "instance"];
17
17
 
18
- // src/contract-values.ts
19
- var AUTH_SCOPE_WILDCARD = "*";
20
- var CHAT_SESSION_AUTH_SCOPES = [
21
- "me:read",
22
- "me:delete",
23
- "config:read",
24
- "conversation:read",
25
- "conversation:write",
26
- "run:start",
27
- "run:observe",
28
- "run:cancel",
29
- "run:command"
30
- ];
31
- var FIRST_PARTY_AUTH_SCOPES = [
32
- AUTH_SCOPE_WILDCARD,
33
- ...CHAT_SESSION_AUTH_SCOPES,
34
- "collaboration_workspace:read",
35
- "collaboration_workspace:manage",
36
- "me:write",
37
- "governance:read",
38
- "governance:write",
39
- "user_admin:read",
40
- "user_admin:write",
41
- "api_access:read",
42
- "api_access:write",
43
- "config_assets:read",
44
- "config_assets:write",
45
- // Moving the published pointer of an asset. A credential that writes drafts with
46
- // `config_assets:write` publishes none of them without this one.
47
- "config_assets:publish",
48
- "config_assets:release",
49
- // The rows of a Data Store: reading them, and adding or loading them. The definition of a
50
- // store and its migrations stay under `config_assets:*`. A scope caps what a key may be
51
- // used for; whether its holder may do it is decided by the grants.
52
- "data_store_rows:read",
53
- "data_store_rows:write"
54
- ];
55
- var ACTIONS = [
18
+ // src/contract-values/agent.ts
19
+ var AGENT_ACTIONS = [
56
20
  "agent.read",
57
21
  "agent.write",
58
22
  "agent.publish",
59
- "agent.delete",
23
+ "agent.delete"
24
+ ];
25
+
26
+ // src/contract-values/skill.ts
27
+ var SKILL_ACTIONS = [
60
28
  "skill.read",
61
29
  "skill.write",
62
30
  "skill.delete",
63
- "skill.approve",
31
+ "skill.approve"
32
+ ];
33
+
34
+ // src/contract-values/connection.ts
35
+ var CONNECTION_ACTIONS = [
64
36
  "connection.read",
65
37
  "connection.use",
66
38
  "connection.write",
67
39
  "connection.delete",
68
- "connection.approve",
40
+ "connection.approve"
41
+ ];
42
+
43
+ // src/contract-values/app.ts
44
+ var APP_ACTIONS = [
69
45
  "app.read",
70
46
  "app.write",
71
47
  "app.publish",
72
48
  "app.approve",
73
49
  "app.delete",
74
- "app.use",
50
+ "app.use"
51
+ ];
52
+
53
+ // src/contract-values/workflow.ts
54
+ var WORKFLOW_ACTIONS = [
75
55
  "workflow.read",
76
56
  "workflow.write",
77
57
  "workflow.publish",
78
58
  "workflow.approve",
79
59
  "workflow.delete",
80
60
  "workflow.use",
81
- "workflow.read_run_data",
61
+ "workflow.read_run_data"
62
+ ];
63
+
64
+ // src/contract-values/data-store.ts
65
+ var DATA_STORE_ACTIONS = [
82
66
  "data_store.read",
83
67
  "data_store.write",
84
68
  "data_store.publish",
85
69
  "data_store.delete",
86
70
  "data_store.insert",
87
71
  "data_store.execute",
88
- "data_store.records",
72
+ "data_store.records"
73
+ ];
74
+
75
+ // src/contract-values/knowledge-base.ts
76
+ var KNOWLEDGE_BASE_ACTIONS = [
89
77
  "knowledge_base.read",
90
78
  "knowledge_base.write",
91
79
  "knowledge_base.publish",
92
80
  "knowledge_base.delete",
93
- "knowledge_base.use",
81
+ "knowledge_base.use"
82
+ ];
83
+
84
+ // src/contract-values/mail-sender.ts
85
+ var MAIL_SENDER_ACTIONS = [
94
86
  // Sending e-mail as one sender of the instance (`mail.send`). The `admin` role holds it on
95
87
  // the sender `system`; a member only by a grant.
96
- "mail_sender.use",
88
+ "mail_sender.use"
89
+ ];
90
+
91
+ // src/contract-values/guardrail.ts
92
+ var GUARDRAIL_ACTIONS = [
97
93
  "guardrail.read",
98
94
  "guardrail.write",
99
95
  "guardrail.publish",
100
- "guardrail.delete",
101
- "operations.approve",
96
+ "guardrail.delete"
97
+ ];
98
+
99
+ // src/contract-values/operations.ts
100
+ var OPERATIONS_ACTIONS = ["operations.approve"];
101
+
102
+ // src/contract-values/feedback.ts
103
+ var FEEDBACK_ACTIONS = [
102
104
  // Reading the written feedback on agent messages and marking it handled (LU-4): on the
103
105
  // instance, or on one workspace for the agents it owns. No bundle carries it.
104
- "feedback.review",
106
+ "feedback.review"
107
+ ];
108
+
109
+ // src/contract-values/administration.ts
110
+ var ADMINISTRATION_ACTIONS = [
105
111
  "users.manage",
106
112
  "usage.view",
107
113
  "audit.view",
@@ -110,11 +116,71 @@ var ACTIONS = [
110
116
  // Their keys stay with `api_access.manage`.
111
117
  "service_principals.manage",
112
118
  "agent_models.manage",
113
- "assets.release",
119
+ // Editing and resetting the built-in roles `user` and `admin`, and deciding their pending
120
+ // actions (Felix, 2026-10-21). Its default sits with `superadmin` alone.
121
+ "roles.edit_built_in",
122
+ "assets.release"
123
+ ];
124
+
125
+ // src/contract-values/workspace.ts
126
+ var WORKSPACE_ACTIONS = [
114
127
  // The two bundles of a workspace: one row each, expanded by the evaluator (`bundleCarries`).
115
128
  "builder",
116
129
  "publisher"
117
130
  ];
131
+
132
+ // src/contract-values.ts
133
+ var AUTH_SCOPE_WILDCARD = "*";
134
+ var CHAT_SESSION_AUTH_SCOPES = [
135
+ "me:read",
136
+ "me:delete",
137
+ "config:read",
138
+ "conversation:read",
139
+ "conversation:write",
140
+ "run:start",
141
+ "run:observe",
142
+ "run:cancel",
143
+ "run:command"
144
+ ];
145
+ var FIRST_PARTY_AUTH_SCOPES = [
146
+ AUTH_SCOPE_WILDCARD,
147
+ ...CHAT_SESSION_AUTH_SCOPES,
148
+ "collaboration_workspace:read",
149
+ "collaboration_workspace:manage",
150
+ "me:write",
151
+ "governance:read",
152
+ "governance:write",
153
+ "user_admin:read",
154
+ "user_admin:write",
155
+ "api_access:read",
156
+ "api_access:write",
157
+ "config_assets:read",
158
+ "config_assets:write",
159
+ // Moving the published pointer of an asset. A credential that writes drafts with
160
+ // `config_assets:write` publishes none of them without this one.
161
+ "config_assets:publish",
162
+ "config_assets:release",
163
+ // The rows of a Data Store: reading them, and adding or loading them. The definition of a
164
+ // store and its migrations stay under `config_assets:*`. A scope caps what a key may be
165
+ // used for; whether its holder may do it is decided by the grants.
166
+ "data_store_rows:read",
167
+ "data_store_rows:write"
168
+ ];
169
+ var ACTIONS = [
170
+ ...AGENT_ACTIONS,
171
+ ...SKILL_ACTIONS,
172
+ ...CONNECTION_ACTIONS,
173
+ ...APP_ACTIONS,
174
+ ...WORKFLOW_ACTIONS,
175
+ ...DATA_STORE_ACTIONS,
176
+ ...KNOWLEDGE_BASE_ACTIONS,
177
+ ...MAIL_SENDER_ACTIONS,
178
+ ...GUARDRAIL_ACTIONS,
179
+ ...OPERATIONS_ACTIONS,
180
+ ...FEEDBACK_ACTIONS,
181
+ ...ADMINISTRATION_ACTIONS,
182
+ ...WORKSPACE_ACTIONS
183
+ ];
118
184
  var APP_ERROR_STATUS_CODES = {
119
185
  BAD_REQUEST: 400,
120
186
  UNAUTHENTICATED: 401,
@@ -370,8 +436,8 @@ var CONVERSATION_ATTACHMENT_STATUSES = [
370
436
  ];
371
437
  var ATTACHMENT_CREATE_OUTCOMES = ["created", "already_available"];
372
438
  var STRUCTURED_DATA_REVIEW_REASONS = ["uncertain", "conflicting"];
373
- var FOLLOW_UP_MODES = ["queue"];
374
- var FOLLOW_UP_STATUSES = ["pending", "dispatched", "cancelled"];
439
+ var FOLLOW_UP_MODES = ["queue", "steer"];
440
+ var FOLLOW_UP_STATUSES = ["pending", "dispatched", "consumed", "cancelled"];
375
441
  var AGENT_RUN_STATUSES = [
376
442
  "queued",
377
443
  "running",
@@ -932,7 +998,14 @@ var agentConfigSchema = z.object({
932
998
  title: localizedStringSchema,
933
999
  prompt: localizedStringSchema
934
1000
  })
935
- ).default([])
1001
+ ).default([]),
1002
+ /**
1003
+ * An agent that ships with the platform, such as Workshaper: the fields as the release
1004
+ * shipped them last. Only the release seed writes it, and every other write keeps it as
1005
+ * stored. A field the instance left as shipped takes what the next release ships; one it
1006
+ * changed stays the instance's.
1007
+ */
1008
+ shipped: z.record(z.string(), z.unknown()).optional()
936
1009
  });
937
1010
  var WORKFLOW_NAME_PATTERN = /^[a-z][a-z0-9_-]{0,62}$/u;
938
1011
  var WORKFLOW_NAME_RULE = "A Workflow id starts with a lowercase letter and holds lowercase letters, digits, '_' and '-', at most 63 characters";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@work-shape/catalyst-asset-schemas",
3
- "version": "0.8.0-rc.6",
3
+ "version": "0.8.0-rc.7",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",