@work-shape/catalyst-cli 0.6.3 → 0.7.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.
package/README.md CHANGED
@@ -7,6 +7,8 @@ npm install --global @work-shape/catalyst-cli
7
7
  catalyst --help
8
8
  ```
9
9
 
10
+ `catalyst setup <claude-code|codex|other> --instance <url>` connects an AI tool on your computer: it logs in by a code you confirm in the browser and writes the Catalyst skill the package ships to `~/.claude/skills/catalyst/` or `~/.agents/skills/catalyst/`.
11
+
10
12
  It needs Node 22 or later. The key is read from `CATALYST_API_KEY`, is sent only to the instance you name over HTTPS, and is never written into the working copy.
11
13
 
12
14
  MIT licence.
package/dist/index.d.ts CHANGED
@@ -33,6 +33,11 @@ interface AgentConfig {
33
33
  maxSteps?: number;
34
34
  toolNames: string[];
35
35
  skillNames: string[];
36
+ /**
37
+ * The Knowledge Bases the agent answers from, by id. However many it lists, the agent has one
38
+ * tool over all of them, `knowledge.query`. Missing means none.
39
+ */
40
+ knowledgeBases?: string[];
36
41
  initialPrompts: AgentInitialPromptConfig[];
37
42
  }
38
43
  interface SkillConfig {
@@ -639,6 +644,7 @@ declare const apiOperations: {
639
644
  }, zod_v4_core.$strip>;
640
645
  release: zod.ZodObject<{
641
646
  version: zod.ZodString;
647
+ cliVersion: zod.ZodOptional<zod.ZodString>;
642
648
  }, zod_v4_core.$strip>;
643
649
  kinds: zod.ZodArray<zod.ZodObject<{
644
650
  kind: zod.ZodString;
@@ -651,6 +657,10 @@ declare const apiOperations: {
651
657
  config: "config";
652
658
  files: "files";
653
659
  }>;
660
+ owners: zod.ZodArray<zod.ZodEnum<{
661
+ instance: "instance";
662
+ workspace: "workspace";
663
+ }>>;
654
664
  actions: zod.ZodObject<{
655
665
  read: zod.ZodString;
656
666
  write: zod.ZodString;
@@ -675,6 +685,16 @@ declare const apiOperations: {
675
685
  displayName: zod.ZodString;
676
686
  actions: zod.ZodArray<zod.ZodString>;
677
687
  }, zod_v4_core.$strip>>;
688
+ workspaces: zod.ZodArray<zod.ZodObject<{
689
+ id: zod.ZodString;
690
+ name: zod.ZodString;
691
+ kind: zod.ZodEnum<{
692
+ personal: "personal";
693
+ shared: "shared";
694
+ }>;
695
+ member: zod.ZodBoolean;
696
+ actions: zod.ZodArray<zod.ZodString>;
697
+ }, zod_v4_core.$strip>>;
678
698
  visibleSections: zod.ZodArray<zod.ZodEnum<{
679
699
  workflows: "workflows";
680
700
  }>>;
@@ -717,6 +737,32 @@ declare const apiOperations: {
717
737
  max: "max";
718
738
  }>>;
719
739
  enabledToolNames: zod.ZodArray<zod.ZodString>;
740
+ tools: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
741
+ name: zod.ZodString;
742
+ title: zod.ZodOptional<zod.ZodObject<{
743
+ en: zod.ZodString;
744
+ de: zod.ZodString;
745
+ }, zod_v4_core.$strip>>;
746
+ summary: zod.ZodOptional<zod.ZodObject<{
747
+ en: zod.ZodString;
748
+ de: zod.ZodString;
749
+ }, zod_v4_core.$strip>>;
750
+ group: zod.ZodOptional<zod.ZodEnum<{
751
+ instance: "instance";
752
+ skills: "skills";
753
+ files: "files";
754
+ documents: "documents";
755
+ web: "web";
756
+ results: "results";
757
+ platform: "platform";
758
+ }>>;
759
+ icon: zod.ZodOptional<zod.ZodString>;
760
+ effect: zod.ZodOptional<zod.ZodEnum<{
761
+ reading: "reading";
762
+ changing: "changing";
763
+ }>>;
764
+ module: zod.ZodOptional<zod.ZodString>;
765
+ }, zod_v4_core.$strip>>>;
720
766
  moduleOffTools: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
721
767
  name: zod.ZodString;
722
768
  module: zod.ZodString;
@@ -4048,6 +4094,246 @@ declare const apiOperations: {
4048
4094
  readonly response: readonly ["Operation-Run-Id", "Location", "Idempotent-Replayed"];
4049
4095
  };
4050
4096
  }>;
4097
+ readonly "knowledge_bases.get": Operation<{
4098
+ readonly id: "knowledge_bases.get";
4099
+ readonly method: "GET";
4100
+ readonly path: "/api/v1/knowledge-bases/:knowledgeBase";
4101
+ readonly summary: "Read the state of one published Knowledge Base: whether its last check could read every table it describes";
4102
+ readonly scope: "config_assets:read";
4103
+ readonly effect: "reading";
4104
+ readonly response: {
4105
+ readonly kind: "json";
4106
+ readonly schema: zod.ZodObject<{
4107
+ id: zod.ZodString;
4108
+ name: zod.ZodString;
4109
+ status: zod.ZodEnum<{
4110
+ ok: "ok";
4111
+ unchecked: "unchecked";
4112
+ needs_attention: "needs_attention";
4113
+ }>;
4114
+ revision: zod.ZodOptional<zod.ZodNumber>;
4115
+ checkedAt: zod.ZodOptional<zod.ZodString>;
4116
+ tables: zod.ZodArray<zod.ZodObject<{
4117
+ name: zod.ZodString;
4118
+ readable: zod.ZodBoolean;
4119
+ }, zod_v4_core.$strip>>;
4120
+ problem: zod.ZodOptional<zod.ZodString>;
4121
+ }, zod_v4_core.$strip>;
4122
+ };
4123
+ readonly errors: readonly ["NOT_FOUND"];
4124
+ readonly rateClass: "read";
4125
+ readonly tag: "Knowledge Bases";
4126
+ readonly auth: "principal";
4127
+ readonly requires: readonly [];
4128
+ } & {
4129
+ readonly headers: {
4130
+ readonly response: readonly ["Operation-Run-Id"];
4131
+ };
4132
+ }>;
4133
+ readonly "knowledge_bases.check": Operation<{
4134
+ readonly id: "knowledge_bases.check";
4135
+ readonly method: "POST";
4136
+ readonly path: "/api/v1/knowledge-bases/:knowledgeBase/check";
4137
+ readonly summary: "Check one published Knowledge Base now: whether every table it describes can be read. It reads no row";
4138
+ readonly scope: "config_assets:write";
4139
+ readonly effect: "changing";
4140
+ readonly response: {
4141
+ readonly kind: "json";
4142
+ readonly schema: zod.ZodObject<{
4143
+ id: zod.ZodString;
4144
+ name: zod.ZodString;
4145
+ status: zod.ZodEnum<{
4146
+ ok: "ok";
4147
+ unchecked: "unchecked";
4148
+ needs_attention: "needs_attention";
4149
+ }>;
4150
+ revision: zod.ZodOptional<zod.ZodNumber>;
4151
+ checkedAt: zod.ZodOptional<zod.ZodString>;
4152
+ tables: zod.ZodArray<zod.ZodObject<{
4153
+ name: zod.ZodString;
4154
+ readable: zod.ZodBoolean;
4155
+ }, zod_v4_core.$strip>>;
4156
+ problem: zod.ZodOptional<zod.ZodString>;
4157
+ }, zod_v4_core.$strip>;
4158
+ };
4159
+ readonly rateClass: "write";
4160
+ readonly tag: "Knowledge Bases";
4161
+ readonly auth: "principal";
4162
+ readonly requires: readonly [];
4163
+ readonly errors: readonly ["NOT_FOUND", "CONFLICT", "TIMEOUT"];
4164
+ } & {
4165
+ readonly accepted: zod.ZodObject<{
4166
+ id: zod.ZodString;
4167
+ operation: zod.ZodString;
4168
+ effect: zod.ZodEnum<{
4169
+ reading: "reading";
4170
+ changing: "changing";
4171
+ }>;
4172
+ status: zod.ZodEnum<{
4173
+ failed: "failed";
4174
+ running: "running";
4175
+ done: "done";
4176
+ pending_approval: "pending_approval";
4177
+ pending_confirmation: "pending_confirmation";
4178
+ denied: "denied";
4179
+ expired: "expired";
4180
+ }>;
4181
+ actor: zod.ZodObject<{
4182
+ kind: zod.ZodEnum<{
4183
+ user: "user";
4184
+ service_principal: "service_principal";
4185
+ }>;
4186
+ id: zod.ZodString;
4187
+ label: zod.ZodString;
4188
+ }, zod_v4_core.$strip>;
4189
+ origin: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
4190
+ kind: zod.ZodLiteral<"agent">;
4191
+ agentRunId: zod.ZodString;
4192
+ conversationId: zod.ZodString;
4193
+ agentName: zod.ZodString;
4194
+ toolCallId: zod.ZodString;
4195
+ toolName: zod.ZodString;
4196
+ toolRevisionId: zod.ZodOptional<zod.ZodString>;
4197
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4198
+ kind: zod.ZodLiteral<"user">;
4199
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4200
+ kind: zod.ZodLiteral<"cli">;
4201
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4202
+ kind: zod.ZodLiteral<"mcp">;
4203
+ clientName: zod.ZodOptional<zod.ZodString>;
4204
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4205
+ kind: zod.ZodLiteral<"app">;
4206
+ appName: zod.ZodOptional<zod.ZodString>;
4207
+ appRevisionId: zod.ZodString;
4208
+ actionName: zod.ZodString;
4209
+ pageSessionId: zod.ZodString;
4210
+ conversationId: zod.ZodOptional<zod.ZodString>;
4211
+ target: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
4212
+ connection: zod.ZodString;
4213
+ operation: zod.ZodString;
4214
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4215
+ dataStore: zod.ZodString;
4216
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4217
+ workflow: zod.ZodString;
4218
+ }, zod_v4_core.$strip>]>>;
4219
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4220
+ kind: zod.ZodLiteral<"workflow">;
4221
+ workflowRunId: zod.ZodString;
4222
+ stepRunId: zod.ZodString;
4223
+ boundBy: zod.ZodOptional<zod.ZodObject<{
4224
+ id: zod.ZodString;
4225
+ label: zod.ZodString;
4226
+ }, zod_v4_core.$strip>>;
4227
+ }, zod_v4_core.$strip>, zod.ZodObject<{
4228
+ kind: zod.ZodLiteral<"schedule">;
4229
+ scheduleId: zod.ZodString;
4230
+ }, zod_v4_core.$strip>], "kind">;
4231
+ target: zod.ZodEnum<{
4232
+ dry_run: "dry_run";
4233
+ live: "live";
4234
+ test: "test";
4235
+ }>;
4236
+ app: zod.ZodOptional<zod.ZodObject<{
4237
+ title: zod.ZodOptional<zod.ZodString>;
4238
+ revision: zod.ZodOptional<zod.ZodNumber>;
4239
+ deleted: zod.ZodBoolean;
4240
+ }, zod_v4_core.$strip>>;
4241
+ workspaceId: zod.ZodOptional<zod.ZodString>;
4242
+ approvalRequestId: zod.ZodOptional<zod.ZodString>;
4243
+ inputHash: zod.ZodString;
4244
+ attempt: zod.ZodNumber;
4245
+ decision: zod.ZodOptional<zod.ZodObject<{
4246
+ mode: zod.ZodEnum<{
4247
+ direct: "direct";
4248
+ confirmed: "confirmed";
4249
+ approved: "approved";
4250
+ declined: "declined";
4251
+ }>;
4252
+ reason: zod.ZodOptional<zod.ZodEnum<{
4253
+ inherited_approval_not_applied: "inherited_approval_not_applied";
4254
+ }>>;
4255
+ by: zod.ZodString;
4256
+ byLabel: zod.ZodOptional<zod.ZodString>;
4257
+ at: zod.ZodISODateTime;
4258
+ comment: zod.ZodOptional<zod.ZodString>;
4259
+ }, zod_v4_core.$strip>>;
4260
+ error: zod.ZodOptional<zod.ZodObject<{
4261
+ code: zod.ZodString;
4262
+ message: zod.ZodString;
4263
+ reason: zod.ZodOptional<zod.ZodString>;
4264
+ }, zod_v4_core.$strip>>;
4265
+ usage: zod.ZodOptional<zod.ZodObject<{
4266
+ modelCalls: zod.ZodNumber;
4267
+ inputTokens: zod.ZodNumber;
4268
+ outputTokens: zod.ZodNumber;
4269
+ totalTokens: zod.ZodNumber;
4270
+ }, zod_v4_core.$strip>>;
4271
+ correlationId: zod.ZodString;
4272
+ createdAt: zod.ZodISODateTime;
4273
+ startedAt: zod.ZodOptional<zod.ZodISODateTime>;
4274
+ finishedAt: zod.ZodOptional<zod.ZodISODateTime>;
4275
+ expiresAt: zod.ZodOptional<zod.ZodISODateTime>;
4276
+ href: zod.ZodString;
4277
+ }, zod_v4_core.$strip>;
4278
+ readonly headers: {
4279
+ readonly request: readonly ["Idempotency-Key"];
4280
+ readonly response: readonly ["Operation-Run-Id", "Location", "Idempotent-Replayed"];
4281
+ };
4282
+ }>;
4283
+ readonly "knowledge_bases.query": Operation<{
4284
+ readonly id: "knowledge_bases.query";
4285
+ readonly method: "POST";
4286
+ readonly path: "/api/v1/knowledge-bases/:knowledgeBase/query";
4287
+ readonly summary: "Read rows of one published Knowledge Base with one read-only statement and bound parameters";
4288
+ readonly scope: "data_store_rows:read";
4289
+ readonly effect: "reading";
4290
+ readonly body: zod.ZodObject<{
4291
+ sql: zod.ZodString;
4292
+ parameters: zod.ZodOptional<zod.ZodArray<zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber, zod.ZodBoolean, zod.ZodNull]>, zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber, zod.ZodBoolean, zod.ZodNull]>>]>, zod.ZodObject<{
4293
+ type: zod.ZodEnum<{
4294
+ number: "number";
4295
+ boolean: "boolean";
4296
+ date: "date";
4297
+ text: "text";
4298
+ integer: "integer";
4299
+ timestamp: "timestamp";
4300
+ "number[]": "number[]";
4301
+ "boolean[]": "boolean[]";
4302
+ "date[]": "date[]";
4303
+ "text[]": "text[]";
4304
+ "integer[]": "integer[]";
4305
+ "timestamp[]": "timestamp[]";
4306
+ }>;
4307
+ value: zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber, zod.ZodBoolean, zod.ZodNull]>, zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber, zod.ZodBoolean, zod.ZodNull]>>]>;
4308
+ }, zod_v4_core.$strict>]>>>;
4309
+ }, zod_v4_core.$strict>;
4310
+ readonly response: {
4311
+ readonly kind: "json";
4312
+ readonly schema: zod.ZodObject<{
4313
+ columns: zod.ZodArray<zod.ZodObject<{
4314
+ name: zod.ZodString;
4315
+ type: zod.ZodString;
4316
+ nativeType: zod.ZodString;
4317
+ }, zod_v4_core.$strip>>;
4318
+ rows: zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
4319
+ truncated: zod.ZodBoolean;
4320
+ source: zod.ZodObject<{
4321
+ knowledgeBase: zod.ZodString;
4322
+ title: zod.ZodString;
4323
+ tables: zod.ZodArray<zod.ZodString>;
4324
+ }, zod_v4_core.$strip>;
4325
+ }, zod_v4_core.$strip>;
4326
+ };
4327
+ readonly rateClass: "read";
4328
+ readonly tag: "Knowledge Bases";
4329
+ readonly auth: "principal";
4330
+ readonly requires: readonly [];
4331
+ readonly errors: readonly ["NOT_FOUND", "CONFLICT", "TIMEOUT"];
4332
+ } & {
4333
+ readonly headers: {
4334
+ readonly response: readonly ["Operation-Run-Id"];
4335
+ };
4336
+ }>;
4051
4337
  readonly "data_stores.query": Operation<{
4052
4338
  readonly id: "data_stores.query";
4053
4339
  readonly method: "POST";
@@ -5751,6 +6037,7 @@ declare const apiOperations: {
5751
6037
  agent: "agent";
5752
6038
  bridge: "bridge";
5753
6039
  workflow: "workflow";
6040
+ outside: "outside";
5754
6041
  }>>;
5755
6042
  enabled: zod.ZodBoolean;
5756
6043
  status: zod.ZodEnum<{
@@ -6196,7 +6483,7 @@ declare const apiOperations: {
6196
6483
  readonly id: "assets.sync";
6197
6484
  readonly method: "POST";
6198
6485
  readonly path: "/api/v1/assets/sync";
6199
- readonly summary: "Apply puts and deletes in one Namespace, all of them or none";
6486
+ readonly summary: "Apply puts and deletes in one Namespace or workspace, all of them or none";
6200
6487
  readonly tag: "Assets";
6201
6488
  readonly auth: "principal";
6202
6489
  readonly scope: "config_assets:write";
@@ -6204,6 +6491,7 @@ declare const apiOperations: {
6204
6491
  readonly effect: "changing";
6205
6492
  readonly body: zod.ZodObject<{
6206
6493
  namespace: zod.ZodOptional<zod.ZodString>;
6494
+ workspaceId: zod.ZodOptional<zod.ZodString>;
6207
6495
  items: zod.ZodArray<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
6208
6496
  type: zod.ZodLiteral<"put">;
6209
6497
  kind: zod.ZodString;
@@ -6380,6 +6668,7 @@ declare const apiOperations: {
6380
6668
  readonly effect: "reading";
6381
6669
  readonly body: zod.ZodObject<{
6382
6670
  namespace: zod.ZodOptional<zod.ZodString>;
6671
+ workspaceId: zod.ZodOptional<zod.ZodString>;
6383
6672
  items: zod.ZodArray<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
6384
6673
  type: zod.ZodLiteral<"put">;
6385
6674
  kind: zod.ZodString;
@@ -7862,6 +8151,32 @@ declare const apiOperations: {
7862
8151
  max: "max";
7863
8152
  }>>;
7864
8153
  enabledToolNames: zod.ZodArray<zod.ZodString>;
8154
+ tools: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
8155
+ name: zod.ZodString;
8156
+ title: zod.ZodOptional<zod.ZodObject<{
8157
+ en: zod.ZodString;
8158
+ de: zod.ZodString;
8159
+ }, zod_v4_core.$strip>>;
8160
+ summary: zod.ZodOptional<zod.ZodObject<{
8161
+ en: zod.ZodString;
8162
+ de: zod.ZodString;
8163
+ }, zod_v4_core.$strip>>;
8164
+ group: zod.ZodOptional<zod.ZodEnum<{
8165
+ instance: "instance";
8166
+ skills: "skills";
8167
+ files: "files";
8168
+ documents: "documents";
8169
+ web: "web";
8170
+ results: "results";
8171
+ platform: "platform";
8172
+ }>>;
8173
+ icon: zod.ZodOptional<zod.ZodString>;
8174
+ effect: zod.ZodOptional<zod.ZodEnum<{
8175
+ reading: "reading";
8176
+ changing: "changing";
8177
+ }>>;
8178
+ module: zod.ZodOptional<zod.ZodString>;
8179
+ }, zod_v4_core.$strip>>>;
7865
8180
  moduleOffTools: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
7866
8181
  name: zod.ZodString;
7867
8182
  module: zod.ZodString;
@@ -10369,10 +10684,10 @@ declare const apiOperations: {
10369
10684
  conversationId: zod.ZodString;
10370
10685
  clientInstanceId: zod.ZodString;
10371
10686
  role: zod.ZodEnum<{
10687
+ tool: "tool";
10372
10688
  user: "user";
10373
10689
  system: "system";
10374
10690
  assistant: "assistant";
10375
- tool: "tool";
10376
10691
  }>;
10377
10692
  text: zod.ZodString;
10378
10693
  createdAt: zod.ZodISODateTime;
@@ -10694,10 +11009,10 @@ declare const apiOperations: {
10694
11009
  conversationId: zod.ZodString;
10695
11010
  clientInstanceId: zod.ZodString;
10696
11011
  role: zod.ZodEnum<{
11012
+ tool: "tool";
10697
11013
  user: "user";
10698
11014
  system: "system";
10699
11015
  assistant: "assistant";
10700
- tool: "tool";
10701
11016
  }>;
10702
11017
  text: zod.ZodString;
10703
11018
  createdAt: zod.ZodISODateTime;
@@ -11083,10 +11398,10 @@ declare const apiOperations: {
11083
11398
  conversationId: zod.ZodString;
11084
11399
  clientInstanceId: zod.ZodString;
11085
11400
  role: zod.ZodEnum<{
11401
+ tool: "tool";
11086
11402
  user: "user";
11087
11403
  system: "system";
11088
11404
  assistant: "assistant";
11089
- tool: "tool";
11090
11405
  }>;
11091
11406
  text: zod.ZodString;
11092
11407
  createdAt: zod.ZodISODateTime;
@@ -11265,10 +11580,10 @@ declare const apiOperations: {
11265
11580
  conversationId: zod.ZodString;
11266
11581
  clientInstanceId: zod.ZodString;
11267
11582
  role: zod.ZodEnum<{
11583
+ tool: "tool";
11268
11584
  user: "user";
11269
11585
  system: "system";
11270
11586
  assistant: "assistant";
11271
- tool: "tool";
11272
11587
  }>;
11273
11588
  text: zod.ZodString;
11274
11589
  createdAt: zod.ZodISODateTime;
@@ -11641,10 +11956,10 @@ declare const apiOperations: {
11641
11956
  conversationId: zod.ZodString;
11642
11957
  clientInstanceId: zod.ZodString;
11643
11958
  role: zod.ZodEnum<{
11959
+ tool: "tool";
11644
11960
  user: "user";
11645
11961
  system: "system";
11646
11962
  assistant: "assistant";
11647
- tool: "tool";
11648
11963
  }>;
11649
11964
  text: zod.ZodString;
11650
11965
  createdAt: zod.ZodISODateTime;
@@ -11823,10 +12138,10 @@ declare const apiOperations: {
11823
12138
  conversationId: zod.ZodString;
11824
12139
  clientInstanceId: zod.ZodString;
11825
12140
  role: zod.ZodEnum<{
12141
+ tool: "tool";
11826
12142
  user: "user";
11827
12143
  system: "system";
11828
12144
  assistant: "assistant";
11829
- tool: "tool";
11830
12145
  }>;
11831
12146
  text: zod.ZodString;
11832
12147
  createdAt: zod.ZodISODateTime;
@@ -14656,6 +14971,7 @@ declare const apiOperations: {
14656
14971
  maxSteps: "maxSteps";
14657
14972
  toolNames: "toolNames";
14658
14973
  skillNames: "skillNames";
14974
+ knowledgeBases: "knowledgeBases";
14659
14975
  initialPrompts: "initialPrompts";
14660
14976
  }>>>;
14661
14977
  allowAgentCreation: zod.ZodDefault<zod.ZodBoolean>;
@@ -15859,6 +16175,11 @@ interface ConfigApiOptions {
15859
16175
  fetchImpl?: typeof fetch;
15860
16176
  /** Waits between tries. Tests pass one that does not wait. */
15861
16177
  sleep?: (milliseconds: number) => Promise<void>;
16178
+ /**
16179
+ * The workspace whose own assets the working copy holds, for a root bound with
16180
+ * `--workspace`. Left out, the instance's own. The reads of assets name it.
16181
+ */
16182
+ workspaceId?: string;
15862
16183
  }
15863
16184
  type FetchImpl = NonNullable<ConfigApiOptions["fetchImpl"]>;
15864
16185
  declare function createConfigApi(options: ConfigApiOptions): Promise<{
@@ -15968,15 +16289,34 @@ declare function canonicalizeSkillConfig(input: unknown): SkillConfig;
15968
16289
  declare function serializeSkillMarkdown(input: unknown, provenance?: AssetProvenance): string;
15969
16290
  declare function serializeSkillPackageForDisplay(input: unknown): string;
15970
16291
 
16292
+ /** The variables this package reads by a fixed name. */
16293
+ interface ConfigCliEnv {
16294
+ /** A key provisioned for automation. It wins over a key `catalyst login` saved. */
16295
+ readonly CATALYST_API_KEY?: string | undefined;
16296
+ /** The folder of the saved keys, in place of `$XDG_CONFIG_HOME/catalyst`. */
16297
+ readonly CATALYST_CONFIG_HOME?: string | undefined;
16298
+ readonly XDG_CONFIG_HOME?: string | undefined;
16299
+ /** The person's home folder, where `catalyst setup` writes the skill of their tool. */
16300
+ readonly HOME?: string | undefined;
16301
+ /** Claude Code's own folder in place of `~/.claude`, where `catalyst setup` writes its skill. */
16302
+ readonly CLAUDE_CONFIG_DIR?: string | undefined;
16303
+ }
16304
+
15971
16305
  declare const MANIFEST_FILENAME = "catalyst.yaml";
15972
16306
  declare const STATE_FILENAME = ".catalyst-state.json";
15973
16307
  interface ManifestInstance {
15974
16308
  url: string;
15975
16309
  /**
15976
- * The one Namespace this working copy writes in, such as `kai-`. A push names it, and leaves
16310
+ * The one Namespace this working copy writes in, such as `tax-`. A push names it, and leaves
15977
16311
  * the instance's default agent alone, which only a release names.
15978
16312
  */
15979
16313
  namespace?: string;
16314
+ /**
16315
+ * The workspace this working copy is bound to, by its id: `catalyst config pull
16316
+ * --workspace <id>` writes it. The root holds what that workspace owns, and everything it
16317
+ * pushes is owned by that workspace. A root names a Namespace or a workspace, not both.
16318
+ */
16319
+ workspace?: string;
15980
16320
  }
15981
16321
  interface CatalystManifest {
15982
16322
  instances: Record<string, ManifestInstance>;
@@ -16037,7 +16377,17 @@ declare function parseManifest(contents: string, source?: string): CatalystManif
16037
16377
  declare function readManifest(workingDir: string): Promise<CatalystManifest>;
16038
16378
  /** The manifest of the folder, or none where the folder is no working copy. */
16039
16379
  declare function readManifestIfPresent(workingDir: string): Promise<CatalystManifest | undefined>;
16040
- declare function resolveInstance(manifest: CatalystManifest, requestedInstance?: string): ResolvedInstance;
16380
+ /**
16381
+ * The instance a command works on: `instance` as an instance of the manifest or as an address,
16382
+ * else the manifest's default instance. A working copy that names neither is refused with the
16383
+ * instances it names: it belongs to one of them, and a saved key never chooses among them.
16384
+ * Outside a working copy (`manifest` undefined), the one instance a key is saved for is taken,
16385
+ * unless `CATALYST_API_KEY` is set, whose instance a saved key does not tell.
16386
+ */
16387
+ declare function resolveInstance(manifest: CatalystManifest | undefined, options?: {
16388
+ instance?: string | undefined;
16389
+ env?: ConfigCliEnv | undefined;
16390
+ }): Promise<ResolvedInstance>;
16041
16391
  declare function readStateFile(path: string): Promise<CatalystState>;
16042
16392
  declare function writeStateFile(path: string, state: CatalystState): Promise<void>;
16043
16393
  declare function readWorkingCopy(workingDir: string, manifest: CatalystManifest): Promise<WorkingCopyBundle>;
@@ -16049,6 +16399,13 @@ declare function guardrailAssetPath(workingDir: string, name: string): string;
16049
16399
  declare function readSkillResources(skillFilePath: string): Promise<SkillResourceConfig[]>;
16050
16400
  declare function removeStaleManifestAssets(workingDir: string, manifest: CatalystManifest, desiredPaths: Set<string>): Promise<void>;
16051
16401
  declare function updateManifestDefaultAgent(path: string, defaultAgentName: string | undefined): Promise<void>;
16402
+ /**
16403
+ * Binds the working copy's instance to a workspace: writes `workspace: <id>` below the
16404
+ * instance's `url` in catalyst.yaml and leaves every other line as it is. An instance that is
16405
+ * not written as a block with its own `url:` line is not changed, and the caller is told to
16406
+ * add the line itself.
16407
+ */
16408
+ declare function bindManifestWorkspace(path: string, instanceKey: string, workspaceId: string): Promise<void>;
16052
16409
  /**
16053
16410
  * Every file below `directory`, by absolute path. `.git` and `node_modules` directly in `root`
16054
16411
  * are skipped.
@@ -16062,6 +16419,8 @@ interface ConfigCommandOptions {
16062
16419
  force?: boolean;
16063
16420
  prune?: boolean;
16064
16421
  only?: string[];
16422
+ /** The workspace `pull` binds the working copy to, or finds it bound to. */
16423
+ workspace?: string;
16065
16424
  assetKind?: AssetKindName;
16066
16425
  assetName?: string;
16067
16426
  fetchImpl?: typeof fetch;
@@ -16091,6 +16450,9 @@ interface DiffFile {
16091
16450
  }
16092
16451
  declare function createUnifiedDiff(oldFile: DiffFile, newFile: DiffFile): string;
16093
16452
 
16453
+ /** The skill file this CLI writes: the shipped skill with a mark of who wrote it. */
16454
+ declare function renderCatalystSkill(): Promise<string>;
16455
+
16094
16456
  interface CliRuntimeOptions {
16095
16457
  cwd?: string;
16096
16458
  fetchImpl?: typeof fetch;
@@ -16099,7 +16461,9 @@ interface CliRuntimeOptions {
16099
16461
  stderr?: (text: string) => void;
16100
16462
  /** Waits between tries. Tests pass one that does not wait. */
16101
16463
  sleep?: (milliseconds: number) => Promise<void>;
16464
+ /** Opens an address in a browser, as `setup` does. Tests pass one that opens nothing. */
16465
+ openUrl?: (address: string) => void;
16102
16466
  }
16103
16467
  declare function runCli(argv: string[], runtime?: CliRuntimeOptions): Promise<number>;
16104
16468
 
16105
- export { ApiKeyExchangeError, type AssetBaseline, type AssetProvenance, type CatalystManifest, type CatalystState, type CliRuntimeOptions, type ConfigApi, ConfigApiError, type ConfigApiOptions, type ConfigCommandName, type ConfigCommandOptions, type DeletedAssetBaseline, type DiffFile, type InstanceBaseline, MANIFEST_FILENAME, type ManifestInstance, type ResolvedInstance, STATE_FILENAME, type SyncBatch, type SyncOutcome, type SyncOutput, type WorkingCopyBundle, type WorkingCopyIssue, WorkingCopyValidationError, agentAssetPath, assertSafeApiKeyExchangeUrl, canonicalBundleFiles, canonicalizeAgentConfig, canonicalizeSkillConfig, createConfigApi, createUnifiedDiff, diffConfig, guardrailAssetPath, instanceFetch, listConfig, matchManifestFiles, matchesManifestPath, parseAgentYaml, parseManifest, parseSkillFile, pullConfig, pushConfig, readManifest, readManifestIfPresent, readSkillResources, readStateFile, readWorkingCopy, removeStaleManifestAssets, resolveInstance, resolveSkillResourceTarget, runCli, runConfigCommand, serializeAgentYaml, serializeSkillMarkdown, serializeSkillPackageForDisplay, showConfig, skillAssetPath, toConfigApiError, updateManifestDefaultAgent, validateConfig, walkFiles, writeStateFile };
16469
+ export { ApiKeyExchangeError, type AssetBaseline, type AssetProvenance, type CatalystManifest, type CatalystState, type CliRuntimeOptions, type ConfigApi, ConfigApiError, type ConfigApiOptions, type ConfigCommandName, type ConfigCommandOptions, type DeletedAssetBaseline, type DiffFile, type InstanceBaseline, MANIFEST_FILENAME, type ManifestInstance, type ResolvedInstance, STATE_FILENAME, type SyncBatch, type SyncOutcome, type SyncOutput, type WorkingCopyBundle, type WorkingCopyIssue, WorkingCopyValidationError, agentAssetPath, assertSafeApiKeyExchangeUrl, bindManifestWorkspace, canonicalBundleFiles, canonicalizeAgentConfig, canonicalizeSkillConfig, createConfigApi, createUnifiedDiff, diffConfig, guardrailAssetPath, instanceFetch, listConfig, matchManifestFiles, matchesManifestPath, parseAgentYaml, parseManifest, parseSkillFile, pullConfig, pushConfig, readManifest, readManifestIfPresent, readSkillResources, readStateFile, readWorkingCopy, removeStaleManifestAssets, renderCatalystSkill, resolveInstance, resolveSkillResourceTarget, runCli, runConfigCommand, serializeAgentYaml, serializeSkillMarkdown, serializeSkillPackageForDisplay, showConfig, skillAssetPath, toConfigApiError, updateManifestDefaultAgent, validateConfig, walkFiles, writeStateFile };