@crewx/sdk 0.9.0-rc.4 → 0.9.0-rc.41

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.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/dist/config/canonicalize-agent-options.d.ts +16 -0
  3. package/dist/config/global-settings.d.ts +19 -0
  4. package/dist/config/models.generated.d.ts +22 -0
  5. package/dist/config/models.remote.d.ts +4 -0
  6. package/dist/config/overdrive.d.ts +29 -0
  7. package/dist/config/pricing.d.ts +8 -8
  8. package/dist/config/pricing.generated.d.ts +2 -0
  9. package/dist/config/pricing.remote.d.ts +4 -0
  10. package/dist/config/pricing.types.d.ts +5 -0
  11. package/dist/config/timeout.config.d.ts +3 -0
  12. package/dist/config/wi-boards.d.ts +15 -0
  13. package/dist/esm/index.js +125 -82
  14. package/dist/esm/plugins/index.js +118 -71
  15. package/dist/esm/repository/index.js +122 -75
  16. package/dist/esm/testing/index.js +1 -1
  17. package/dist/events/types.d.ts +2 -0
  18. package/dist/facade/Crewx.d.ts +12 -0
  19. package/dist/index.browser.d.ts +1 -1
  20. package/dist/index.browser.js +2 -2
  21. package/dist/index.d.ts +17 -6
  22. package/dist/index.js +126 -83
  23. package/dist/internal/windows-spawn.d.ts +10 -0
  24. package/dist/migrations/0008_careful_black_bird.sql +17 -0
  25. package/dist/migrations/0009_hot_dark_phoenix.sql +1 -0
  26. package/dist/migrations/0010_analyze_stats.sql +6 -0
  27. package/dist/migrations/0011_far_black_tarantula.sql +1 -0
  28. package/dist/migrations/0012_blue_turbo.sql +23 -0
  29. package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
  30. package/dist/migrations/meta/0008_snapshot.json +1327 -0
  31. package/dist/migrations/meta/0009_snapshot.json +1335 -0
  32. package/dist/migrations/meta/0010_snapshot.json +1335 -0
  33. package/dist/migrations/meta/0011_snapshot.json +1342 -0
  34. package/dist/migrations/meta/0012_snapshot.json +1494 -0
  35. package/dist/migrations/meta/0013_snapshot.json +1592 -0
  36. package/dist/migrations/meta/_journal.json +42 -0
  37. package/dist/plugin/types.d.ts +1 -0
  38. package/dist/plugins/index.js +118 -71
  39. package/dist/provider/acp/adapters/claude.d.ts +0 -4
  40. package/dist/provider/acp/connection.d.ts +4 -0
  41. package/dist/provider/acp/meta.d.ts +4 -0
  42. package/dist/provider/bridge.d.ts +13 -1
  43. package/dist/provider/cli/adapter.types.d.ts +1 -0
  44. package/dist/provider/cli/adapters/claude.d.ts +0 -1
  45. package/dist/provider/cli/adapters/cli-knob.util.d.ts +2 -0
  46. package/dist/provider/cli/meta.d.ts +10 -2
  47. package/dist/provider/errors.d.ts +1 -0
  48. package/dist/provider/idle-watchdog.d.ts +19 -0
  49. package/dist/provider/models.d.ts +23 -0
  50. package/dist/provider/order.d.ts +1 -0
  51. package/dist/provider/parse-usage.d.ts +6 -0
  52. package/dist/provider/provider-selection.d.ts +8 -0
  53. package/dist/repository/agent-suggestion.repository.d.ts +34 -0
  54. package/dist/repository/index.d.ts +7 -1
  55. package/dist/repository/index.js +122 -75
  56. package/dist/repository/notification.repository.d.ts +58 -0
  57. package/dist/repository/task.repository.d.ts +79 -0
  58. package/dist/repository/thread.repository.d.ts +16 -2
  59. package/dist/repository/usage-report.repository.d.ts +27 -0
  60. package/dist/schema/agent-suggestions.d.ts +199 -0
  61. package/dist/schema/index.d.ts +3 -0
  62. package/dist/schema/notifications.d.ts +303 -0
  63. package/dist/schema/usage-reports.d.ts +252 -0
  64. package/dist/testing/index.d.ts +2 -0
  65. package/dist/testing/index.js +1 -1
  66. package/dist/types/index.d.ts +141 -3
  67. package/dist/utils/id.d.ts +1 -1
  68. package/package.json +3 -2
  69. package/templates/agents/default.yaml +175 -117
  70. package/templates/documents/crewx-manual.md +138 -138
@@ -397,6 +397,54 @@ export interface GuideRule {
397
397
  say: string;
398
398
  once?: boolean;
399
399
  }
400
+ export declare const WiBoardSchema: z.ZodObject<{
401
+ id: z.ZodString;
402
+ name: z.ZodString;
403
+ workflow_id: z.ZodString;
404
+ description: z.ZodOptional<z.ZodString>;
405
+ goal_id: z.ZodOptional<z.ZodString>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ id: string;
408
+ name: string;
409
+ workflow_id: string;
410
+ description?: string | undefined;
411
+ goal_id?: string | undefined;
412
+ }, {
413
+ id: string;
414
+ name: string;
415
+ workflow_id: string;
416
+ description?: string | undefined;
417
+ goal_id?: string | undefined;
418
+ }>;
419
+ export type WiBoardConfig = z.infer<typeof WiBoardSchema>;
420
+ export declare const SettingsSchema: z.ZodObject<{
421
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
422
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
423
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
424
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
425
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
426
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
427
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
428
+ }, z.ZodUnknown, "strip">>>>;
429
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
430
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
431
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
432
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
433
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
434
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
435
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
436
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
437
+ }, z.ZodUnknown, "strip">>>>;
438
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
439
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
440
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
441
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
442
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
443
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
444
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
445
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
446
+ }, z.ZodUnknown, "strip">>>>;
447
+ }, z.ZodUnknown, "strip">>;
400
448
  export declare const CrewxProjectConfigSchema: z.ZodObject<{
401
449
  agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
402
450
  id: z.ZodString;
@@ -685,7 +733,34 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
685
733
  }>>;
686
734
  }, z.ZodUnknown, "strip">>, "many">>;
687
735
  hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
688
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
736
+ settings: z.ZodOptional<z.ZodObject<{
737
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
738
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
739
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
740
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
741
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
742
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
743
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
744
+ }, z.ZodUnknown, "strip">>>>;
745
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
746
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
747
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
748
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
749
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
750
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
751
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
752
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
753
+ }, z.ZodUnknown, "strip">>>>;
754
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
755
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
756
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
757
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
758
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
759
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
760
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
761
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
762
+ }, z.ZodUnknown, "strip">>>>;
763
+ }, z.ZodUnknown, "strip">>>;
689
764
  skills: z.ZodOptional<z.ZodUnknown>;
690
765
  layouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
691
766
  documents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -977,7 +1052,34 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
977
1052
  }>>;
978
1053
  }, z.ZodUnknown, "strip">>, "many">>;
979
1054
  hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
980
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1055
+ settings: z.ZodOptional<z.ZodObject<{
1056
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1057
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1058
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1059
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1060
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1061
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1062
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1063
+ }, z.ZodUnknown, "strip">>>>;
1064
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1065
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1066
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1067
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1068
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1069
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1070
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1071
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1072
+ }, z.ZodUnknown, "strip">>>>;
1073
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1074
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1075
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1076
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1077
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1078
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1079
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1080
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1081
+ }, z.ZodUnknown, "strip">>>>;
1082
+ }, z.ZodUnknown, "strip">>>;
981
1083
  skills: z.ZodOptional<z.ZodUnknown>;
982
1084
  layouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
983
1085
  documents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1269,7 +1371,34 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
1269
1371
  }>>;
1270
1372
  }, z.ZodUnknown, "strip">>, "many">>;
1271
1373
  hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
1272
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1374
+ settings: z.ZodOptional<z.ZodObject<{
1375
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1376
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1377
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1378
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1379
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1380
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1381
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1382
+ }, z.ZodUnknown, "strip">>>>;
1383
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1384
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1385
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1386
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1387
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1388
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1389
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1390
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1391
+ }, z.ZodUnknown, "strip">>>>;
1392
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1393
+ bin_resolution: z.ZodOptional<z.ZodEnum<["global_first", "local_first"]>>;
1394
+ wi: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1395
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1396
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1397
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1398
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1399
+ boards: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
1400
+ }, z.ZodUnknown, "strip">>>>;
1401
+ }, z.ZodUnknown, "strip">>>;
1273
1402
  skills: z.ZodOptional<z.ZodUnknown>;
1274
1403
  layouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1275
1404
  documents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1299,6 +1428,7 @@ export interface CrewxOptions {
1299
1428
  };
1300
1429
  remoteFactory?: (configPath: string) => Promise<import('../facade/Crewx').Crewx>;
1301
1430
  includeBuiltIns?: boolean;
1431
+ additionalArgsProvider?: import('../provider/bridge').AdditionalArgsProvider;
1302
1432
  }
1303
1433
  export interface QueryOptions {
1304
1434
  model?: string;
@@ -1306,6 +1436,9 @@ export interface QueryOptions {
1306
1436
  effort?: string;
1307
1437
  context?: string;
1308
1438
  metadata?: Record<string, unknown>;
1439
+ overdrive?: boolean | {
1440
+ mode?: 'count' | 'latch';
1441
+ };
1309
1442
  threadId?: string;
1310
1443
  taskId?: string;
1311
1444
  platform?: Platform;
@@ -1314,6 +1447,7 @@ export interface QueryOptions {
1314
1447
  cwd?: string;
1315
1448
  resumeSessionId?: string;
1316
1449
  trace?: TraceContext;
1450
+ callerIdentity?: CollaborationWorkspaceContext;
1317
1451
  }
1318
1452
  export interface QueryResult {
1319
1453
  ok: boolean;
@@ -1343,6 +1477,9 @@ export interface ExecuteOptions {
1343
1477
  effort?: string;
1344
1478
  context?: string;
1345
1479
  metadata?: Record<string, unknown>;
1480
+ overdrive?: boolean | {
1481
+ mode?: 'count' | 'latch';
1482
+ };
1346
1483
  threadId?: string;
1347
1484
  taskId?: string;
1348
1485
  platform?: Platform;
@@ -1351,6 +1488,7 @@ export interface ExecuteOptions {
1351
1488
  cwd?: string;
1352
1489
  resumeSessionId?: string;
1353
1490
  trace?: TraceContext;
1491
+ callerIdentity?: CollaborationWorkspaceContext;
1354
1492
  }
1355
1493
  export interface ExecuteResult {
1356
1494
  ok: boolean;
@@ -1,4 +1,4 @@
1
- export type EntityPrefix = 'tsk' | 'thd' | 'msg' | 'box' | 'prj' | 'mem' | 'spn' | 'cron' | 'wbs' | 'job' | 'tcl' | 'req' | 'ws' | 'wfr';
1
+ export type EntityPrefix = 'tsk' | 'thd' | 'msg' | 'box' | 'prj' | 'mem' | 'spn' | 'cron' | 'wbs' | 'job' | 'tcl' | 'req' | 'ws' | 'wfr' | 'ntf' | 'sug' | 'brd';
2
2
  export type PrefixedId<P extends EntityPrefix> = `${P}_${string}`;
3
3
  export declare function generateId<P extends EntityPrefix>(prefix: P): PrefixedId<P>;
4
4
  export declare function generateFingerprint<P extends EntityPrefix>(prefix: P, input: string): PrefixedId<P>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.9.0-rc.4",
3
+ "version": "0.9.0-rc.41",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"
@@ -117,11 +117,12 @@
117
117
  "vitest": "3.2.4"
118
118
  },
119
119
  "scripts": {
120
+ "prebuild": "node scripts/generate-pricing.mjs && node scripts/generate-models.mjs",
120
121
  "build:cjs": "tsup --config tsup.cjs.js",
121
122
  "build:esm": "tsup --config tsup.esm.js",
122
123
  "build:browser": "tsup --config tsup.browser.js",
123
124
  "build:dts": "tsc -p tsconfig.dts.json",
124
- "build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:browser && pnpm run build:dts && node scripts/copy-migrations.mjs",
125
+ "build": "pnpm run prebuild && pnpm run build:cjs && pnpm run build:esm && pnpm run build:browser && pnpm run build:dts && node scripts/copy-migrations.mjs",
125
126
  "db:generate": "cd ../.. && drizzle-kit generate --config drizzle.config.ts && node packages/sdk/scripts/post-generate.mjs",
126
127
  "db:check": "cd ../.. && drizzle-kit check --config drizzle.config.ts",
127
128
  "test": "vitest run --config ./vitest.config.ts",
@@ -46,6 +46,13 @@ layouts:
46
46
  </dispatched_from>
47
47
  {{/if}}
48
48
 
49
+ {{#if vars.crewx_workspace_path}}
50
+ <current_workspace>
51
+ <path>{{{vars.crewx_workspace_path}}}</path>
52
+ <note>This is the absolute path of the workspace you are currently running in.</note>
53
+ </current_workspace>
54
+ {{/if}}
55
+
49
56
  {{#if agentMetadata.specialties.length}}
50
57
  <specialties>
51
58
  {{#each agentMetadata.specialties}}
@@ -121,6 +128,26 @@ layouts:
121
128
  </cli_options>
122
129
  {{/if}}
123
130
  </session>
131
+
132
+ <delegation_lifecycle>
133
+ You are running as a SINGLE-SHOT CLI process (print mode). There is no next turn:
134
+ - The moment you emit your final answer, this process exits and every child
135
+ process it spawned — including backgrounded Bash commands — is killed (SIGTERM).
136
+ - Harness messages like "running in the background" or "you will be notified
137
+ when it completes" are NOT true in this mode. That notification will never
138
+ arrive; trusting it silently kills the delegated work.
139
+
140
+ Rules for delegation and long-running commands:
141
+ - Run delegations (npx crewx q / npx crewx x) in the FOREGROUND and wait for
142
+ the result within the same turn. Never use run_in_background, `&`, or nohup
143
+ for a CrewX delegation.
144
+ - If the harness force-moves a long command to the background (e.g. on
145
+ timeout), do NOT end your turn. Keep checking completion with short
146
+ foreground status checks until it actually finishes.
147
+ - A PID, a "running" status, a partially created file, or a --thread link is
148
+ NOT evidence of completion. Report success only after the command has
149
+ exited and returned its final result.
150
+ </delegation_lifecycle>
124
151
  </agent_profile>
125
152
  {{/if}}
126
153
 
@@ -239,6 +266,13 @@ layouts:
239
266
  ```
240
267
 
241
268
  → Full usage: `{{env.CREWX_CLI}} workflow --help`
269
+
270
+ ### Notify (`{{env.CREWX_CLI}} notify`)
271
+ Send an in-app notification to the user's CrewX dashboard. Use for signals that need the user's attention or judgment after a run (e.g. schedule alerts, a decision blocking progress) — not routine success logs.
272
+
273
+ ```bash
274
+ {{env.CREWX_CLI}} notify "<title>" [--level=info|warning|critical] [--body="..."]
275
+ ```
242
276
  </builtin_tools>
243
277
  {{/if}}
244
278
 
@@ -389,17 +423,12 @@ documents:
389
423
  path: "../documents/crewx-manual.md"
390
424
  summary: "CrewX User Manual"
391
425
 
392
- # 빌트인 에이전트(@claude, @gemini 등)용 가벼운 안내서. 자세한 건 @crewx에게.
393
- crewx_quick_guide:
394
- path: "../documents/crewx-quick-guide.md"
395
- render: true
396
-
397
426
  agents:
398
427
  - id: "crewx"
399
428
  name: "CrewX Assistant"
400
429
  role: "assistant"
401
430
  team: "CrewX"
402
- provider: ["cli/claude", "cli/gemini", "cli/copilot"] # Fallback order: claude → gemini → copilot
431
+ provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
403
432
  working_directory: "."
404
433
  # Note: Uses provider array for automatic fallback when no model is specified
405
434
  inline:
@@ -430,123 +459,152 @@ agents:
430
459
  options:
431
460
  execute:
432
461
  cli/claude: ["--add-dir=.", "--permission-mode=acceptEdits"]
433
- cli/gemini: ["--include-directories=."]
434
462
  cli/copilot: ["--add-dir=."]
435
463
 
436
- - id: "claude"
437
- name: "Claude AI"
438
- role: "general"
439
- team: "Anthropic"
440
- provider: "cli/claude"
464
+ - id: "self_improve_analyst"
465
+ name: "Self-Improve Analyst"
466
+ role: "Prompt Improvement Analyst"
467
+ team: "CrewX"
468
+ description: "Analyzes agent prompts and proposes improvement suggestions (Suggestion H1)"
469
+ provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
441
470
  working_directory: "."
442
- inline:
443
- prompt: |
444
- You are Claude, an AI assistant by Anthropic, integrated as a built-in agent in the CrewX system.
445
-
446
- ## Your Strengths
447
- - Complex reasoning and analysis
448
- - Code review and architecture design
449
- - Detailed explanations
450
- - Web search capabilities
451
-
452
- {{#if documents.crewx_quick_guide}}
453
- <document title="Built-in Agent Guidelines" drilldown="true">
454
- **Table of Contents:**
455
- {{{documents.crewx_quick_guide.toc}}}
456
-
457
- > Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
458
- </document>
459
- {{/if}}
471
+ env:
472
+ GIT_AUTHOR_NAME: '{{agent.name}}'
473
+ GIT_AUTHOR_EMAIL: crewx+{{agent.id}}@sowonlabs.com
460
474
  options:
461
- query: ["--add-dir=.", "--allowed-tools=WebSearch", "--output-format", "stream-json", "--verbose"]
462
- execute: ["--add-dir=.", "--allowed-tools=WebSearch", "--output-format", "stream-json", "--permission-mode=acceptEdits", "--verbose"]
463
-
464
- - id: "gemini"
465
- name: "Google Gemini"
466
- role: "general"
467
- team: "Google"
468
- provider: "cli/gemini"
469
- working_directory: "."
475
+ query:
476
+ effort: high
477
+ mode: auto
478
+ execute:
479
+ effort: high
480
+ mode: auto
470
481
  inline:
471
- prompt: |
472
- You are Gemini, Google's AI model, integrated as a built-in agent in the CrewX system.
473
-
474
- ## Your Strengths
475
- - Performance optimization
476
- - Data analysis and mathematical problems
477
- - Research and information gathering
478
- - Web search capabilities
479
-
480
- {{#if documents.crewx_quick_guide}}
481
- <document title="Built-in Agent Guidelines" drilldown="true">
482
- **Table of Contents:**
483
- {{{documents.crewx_quick_guide.toc}}}
484
-
485
- > Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
486
- </document>
487
- {{/if}}
488
- options:
489
- query: ["--include-directories=.", "--allowed-tools=web_search"]
490
- execute: ["--include-directories=.", "--allowed-tools=web_search"]
491
-
492
- - id: "copilot"
493
- name: "GitHub Copilot"
494
- role: "general"
495
- team: "GitHub"
496
- provider: "cli/copilot"
482
+ layout: crewx/minimal
483
+ prompt: |-
484
+ You are the Self-Improve Analyst agent for CrewX. Your job is to analyze a
485
+ target agent's usage history and propose concrete improvements to that
486
+ agent's prompt documentation.
487
+
488
+ ## Task
489
+ Each request gives you one target agent's memory summary, recent failed
490
+ tasks, and rework rate. Locate and read that agent's actual prompt before
491
+ proposing anything: a standalone .md file for file-based agents, or the
492
+ raw inline prompt text supplied in the request message for crewx.yaml
493
+ inline-prompt agents.
494
+
495
+ ## Rules
496
+ - Never fabricate evidence. If you find no clear, well-supported
497
+ improvement, return an empty JSON array.
498
+ - You have read access to the repository. Do not modify any files
499
+ yourself — you only propose changes; a separate system applies them
500
+ after review.
501
+ - Output ONLY the JSON specified in the request message — no prose, no
502
+ markdown outside the JSON block.
503
+ - If the target agent's prompt is inline (a crewx.yaml `inline.prompt`
504
+ block): the request message provides the agent's current raw prompt
505
+ in full. Propose with `target: {kind: "inline_prompt", agentId}`,
506
+ `before` set to an exact copy of that provided raw prompt, and
507
+ `after` set to the improved full text.
508
+ - If the target agent's prompt is a standalone `.md` document: propose
509
+ with `target: {kind: "file", file}` as before.
510
+ - Causal relaxation: even when a clear defect (a stale agent roster, a
511
+ stale reference, etc.) has no direct causal link to the failure
512
+ history, you may still propose it with `confidence: "low"`. Do not
513
+ fabricate a causal link — a low-confidence proposal's description
514
+ must honestly state that it is unrelated to the failure history.
515
+ - Even when there are zero proposals, the output must be JSON only —
516
+ answering in prose is not allowed. (Observed 2026-07-22:
517
+ tsk_wSdT7B5q / tsk_2KD2Kfs2 answered in prose and were treated as
518
+ PARSE_EMPTY.)
519
+
520
+ ## How to write suggestions (the reader has never written code)
521
+ - The reader is a business owner who has NEVER programmed and does not know
522
+ developer words. Treat every technical noun as forbidden in `title` and
523
+ `description`: no file paths, no code identifiers, and no developer jargon
524
+ such as commit, merge, branch, repository, YAML, API, token, diff, prompt,
525
+ workflow, baseline — in any language.
526
+ - When a technical concept is unavoidable, describe its everyday EFFECT instead
527
+ of naming the mechanism. Example: instead of "Add a verification rule to the
528
+ prompt", write "The agent will double-check its work on the real screen
529
+ before reporting it as done."
530
+ - `title`: one short sentence stating the benefit (what gets better for the
531
+ reader), in everyday words.
532
+ - `description`: 2-3 short sentences — first the benefit in daily-life words,
533
+ then how the agent's behavior will change, described by its effect. No
534
+ mechanism talk.
535
+ - Self-check before returning: "Would a cafe owner with no software background
536
+ understand every single word of the title and description?" If not, rewrite
537
+ until they would.
538
+ - Write `title`/`description` in the same language as the target agent's
539
+ prompt (do not force English).
540
+ - `before`/`after` stay verbatim technical content — the plain-language rules
541
+ apply ONLY to `title` and `description`.
542
+ skills:
543
+ include: []
544
+
545
+ - id: "memory_summarizer"
546
+ name: "Memory Summarizer"
547
+ role: "summarizer"
548
+ team: "CrewX"
549
+ description: "Memory summarizer agent - incremental summary generation (HiAgent + MemGAS)"
550
+ provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
497
551
  working_directory: "."
498
- inline:
499
- prompt: |
500
- You are GitHub Copilot, an AI coding assistant by GitHub, integrated as a built-in agent in the CrewX system.
501
-
502
- ## Your Strengths
503
- - Code implementation and generation
504
- - Best practices and coding standards
505
- - Testing and debugging
506
- - Quick code suggestions
507
-
508
- **IMPORTANT COPILOT-SPECIFIC RULES:**
509
- - Do NOT use bullet points (●) or other formatting before the tags
510
-
511
- ## Note
512
- You do not have web search capabilities. For web research, users should use @claude or @gemini.
513
-
514
- {{#if documents.crewx_quick_guide}}
515
- <document title="Built-in Agent Guidelines" drilldown="true">
516
- **Table of Contents:**
517
- {{{documents.crewx_quick_guide.toc}}}
518
-
519
- > Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
520
- </document>
521
- {{/if}}
552
+ env:
553
+ GIT_AUTHOR_NAME: '{{agent.name}}'
554
+ GIT_AUTHOR_EMAIL: crewx+{{agent.id}}@sowonlabs.com
522
555
  options:
523
- query: ["--add-dir=."]
524
- execute: ["--add-dir=."]
525
-
526
- - id: "codex"
527
- name: "Codex AI"
528
- role: "general"
529
- team: "Codex"
530
- provider: "cli/codex"
531
- working_directory: "."
556
+ query: {}
532
557
  inline:
533
- prompt: |
534
- You are Codex, an AI assistant integrated as a built-in agent in the CrewX system.
535
-
536
- ## Your Strengths
537
- - Code generation and analysis
538
- - Development assistance
539
- - Problem solving
540
- - Technical documentation
541
-
542
- {{#if documents.crewx_quick_guide}}
543
- <document title="Built-in Agent Guidelines" drilldown="true">
544
- **Table of Contents:**
545
- {{{documents.crewx_quick_guide.toc}}}
546
-
547
- > Need details? Read the file at: `{{documents.crewx_quick_guide.path}}`
548
- </document>
549
- {{/if}}
558
+ layout: crewx/minimal
559
+ prompt: |-
560
+ You are a Memory Summarizer Agent. Your job is to create concise summaries of memory entries.
561
+
562
+ ## Task
563
+ Given memory entries (and optionally an existing summary), produce an updated summary.
564
+
565
+ ## Output Rules
566
+ - Write a concise summary (3-10 sentences)
567
+ - Highlight key decisions, insights, and action items
568
+ - If existing summary provided, merge new information into it (MemGAS approach)
569
+ - Group related information together
570
+ - Output ONLY the summary text, no headers or formatting prefixes
571
+ - Do NOT include "[ID]" references in the summary
572
+
573
+ ## Response Language
574
+ - Write the summary in the same language as the memory entries
575
+ - If the entries mix languages, follow the dominant one
576
+ - Use clear, concise language
577
+ skills:
578
+ include: []
579
+
580
+ - id: "memory_searcher"
581
+ name: "Memory Searcher"
582
+ role: "searcher"
583
+ team: "CrewX"
584
+ description: "Semantic search agent - finds relevant memories among memory entries"
585
+ provider: ["cli/codex", "cli/claude", "cli/opencode", "cli/copilot"] # Fallback order: codex → claude → opencode → copilot
586
+ working_directory: "."
587
+ env:
588
+ GIT_AUTHOR_NAME: '{{agent.name}}'
589
+ GIT_AUTHOR_EMAIL: crewx+{{agent.id}}@sowonlabs.com
550
590
  options:
551
- query: ["exec", "--experimental-json"]
552
- execute: ["exec", "-s", "workspace-write", "--experimental-json"]
591
+ query: {}
592
+ inline:
593
+ layout: crewx/minimal
594
+ prompt: |-
595
+ You are a Memory Searcher Agent. Your job is to find relevant memories from the provided memory list.
596
+
597
+ ## Task
598
+ Given a list of memories and a user query, find the most relevant memories.
599
+
600
+ ## Output Rules
601
+ - If relevant memories found: List IDs with brief explanation
602
+ - If no relevant memories: say so explicitly in one short sentence
603
+ - Maximum 5 recommendations
604
+ - Format: [ID] summary - why it is relevant
605
+
606
+ ## Response Language
607
+ - Answer in the same language as the user query
608
+ - Keep explanations concise
609
+ skills:
610
+ include: []