@crouton-kit/crouter 0.3.8 → 0.3.11
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/cli.js +14 -24
- package/dist/commands/agent.d.ts +4 -0
- package/dist/commands/agent.js +444 -243
- package/dist/commands/debug.d.ts +1 -1
- package/dist/commands/debug.js +20 -7
- package/dist/commands/human.js +51 -19
- package/dist/commands/job.d.ts +9 -0
- package/dist/commands/job.js +50 -10
- package/dist/commands/mode.d.ts +2 -0
- package/dist/commands/mode.js +231 -0
- package/dist/commands/pkg.js +5 -0
- package/dist/commands/plan.d.ts +1 -1
- package/dist/commands/plan.js +24 -11
- package/dist/commands/skill.js +20 -4
- package/dist/commands/spec.d.ts +1 -1
- package/dist/commands/spec.js +24 -11
- package/dist/commands/sys.js +5 -0
- package/dist/core/__tests__/job.test.js +11 -11
- package/dist/core/__tests__/jobs.test.js +33 -1
- package/dist/core/__tests__/resolver.test.js +69 -1
- package/dist/core/__tests__/spawn.test.d.ts +1 -0
- package/dist/core/__tests__/spawn.test.js +138 -0
- package/dist/core/__tests__/subagents.test.d.ts +1 -0
- package/dist/core/__tests__/subagents.test.js +75 -0
- package/dist/core/__tests__/unknown-path.test.d.ts +1 -0
- package/dist/core/__tests__/unknown-path.test.js +52 -0
- package/dist/core/bootstrap.d.ts +2 -0
- package/dist/core/bootstrap.js +66 -0
- package/dist/core/command.d.ts +58 -2
- package/dist/core/command.js +62 -14
- package/dist/core/frontmatter.d.ts +10 -0
- package/dist/core/frontmatter.js +24 -9
- package/dist/core/help.d.ts +39 -8
- package/dist/core/help.js +64 -32
- package/dist/core/jobs.d.ts +8 -2
- package/dist/core/jobs.js +109 -6
- package/dist/core/resolver.js +51 -1
- package/dist/core/spawn.d.ts +140 -23
- package/dist/core/spawn.js +392 -73
- package/dist/core/subagents.d.ts +18 -0
- package/dist/core/subagents.js +163 -0
- package/dist/prompts/agent.d.ts +10 -1
- package/dist/prompts/agent.js +34 -3
- package/dist/types.d.ts +21 -0
- package/dist/types.js +3 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { defineRoot, runCli } from './core/command.js';
|
|
3
3
|
import { registerAgent } from './commands/agent.js';
|
|
4
|
+
import { registerMode } from './commands/mode.js';
|
|
4
5
|
import { registerSkill } from './commands/skill.js';
|
|
5
|
-
import { registerPkg } from './commands/pkg.js';
|
|
6
6
|
import { registerJob } from './commands/job.js';
|
|
7
|
+
import { registerPkg } from './commands/pkg.js';
|
|
7
8
|
import { registerHuman } from './commands/human.js';
|
|
8
9
|
import { registerSys } from './commands/sys.js';
|
|
9
10
|
import { maybeAutoUpdate } from './core/auto-update.js';
|
|
10
|
-
import { ensureBootSkill, ensureOfficialMarketplace, ensureProjectScope } from './core/bootstrap.js';
|
|
11
|
+
import { ensureBootSkill, ensureOfficialMarketplace, ensureProjectScope, ensureSlashCommands } from './core/bootstrap.js';
|
|
12
|
+
// Root owns only the tagline and globals. Every subtree's concept line,
|
|
13
|
+
// selection rubric, and any dynamic block it contributes to root -h are
|
|
14
|
+
// declared on the subtree itself (its rootEntry) and assembled here by
|
|
15
|
+
// defineRoot. Add a subtree to this list and it appears at root; nothing about
|
|
16
|
+
// it is restated here.
|
|
11
17
|
const root = defineRoot({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{ name: 'skill', desc: 'loadable SKILL.md document an agent reads to adopt a workflow' },
|
|
17
|
-
{ name: 'pkg', desc: 'plugins and marketplaces that supply skills' },
|
|
18
|
-
{ name: 'job', desc: 'producer-agnostic record of any ongoing task — its logs and result' },
|
|
19
|
-
{ name: 'human', desc: 'human-in-the-loop decisions, document review, and live display' },
|
|
20
|
-
{ name: 'sys', desc: 'crtr configuration, diagnostics, and self-management' },
|
|
21
|
-
],
|
|
22
|
-
subtrees: [
|
|
23
|
-
{ name: 'agent', desc: 'spec/plan/debug and spawn workers', useWhen: 'capturing requirements, planning, debugging, or launching an agent worker' },
|
|
24
|
-
{ name: 'skill', desc: 'discover, read, author, and manage skills', useWhen: 'working with SKILL.md documents' },
|
|
25
|
-
{ name: 'pkg', desc: 'manage plugins and marketplaces', useWhen: 'installing or browsing skill collections' },
|
|
26
|
-
{ name: 'job', desc: 'monitor and collect from any ongoing task', useWhen: 'reading status, logs, or result of a job started by any producer' },
|
|
27
|
-
{ name: 'human', desc: 'ask, approve, review, notify, show, inbox, list', useWhen: 'putting a decision or document in front of a person' },
|
|
28
|
-
{ name: 'sys', desc: 'config, doctor, update, version', useWhen: 'managing the crtr installation' },
|
|
29
|
-
],
|
|
30
|
-
globals: [
|
|
31
|
-
{ name: '-h', desc: 'print help for any node — append to any subcommand path' },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
18
|
+
tagline: 'crtr: agentic planning runtime.',
|
|
19
|
+
globals: [
|
|
20
|
+
{ name: '-h', desc: 'print help for any node — append to any subcommand path' },
|
|
21
|
+
],
|
|
34
22
|
subtrees: [
|
|
35
23
|
registerAgent(),
|
|
24
|
+
registerMode(),
|
|
36
25
|
registerSkill(),
|
|
37
26
|
registerPkg(),
|
|
38
27
|
registerJob(),
|
|
@@ -42,6 +31,7 @@ const root = defineRoot({
|
|
|
42
31
|
});
|
|
43
32
|
ensureOfficialMarketplace(process.argv);
|
|
44
33
|
ensureBootSkill(process.argv);
|
|
34
|
+
ensureSlashCommands(root, process.argv);
|
|
45
35
|
ensureProjectScope(process.argv);
|
|
46
36
|
maybeAutoUpdate(process.argv);
|
|
47
37
|
runCli(root, process.argv).catch((err) => {
|
package/dist/commands/agent.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { BranchDef } from '../core/command.js';
|
|
2
|
+
export declare const DEFAULT_KILL_SECS = 2;
|
|
3
|
+
export declare function followUpResult(jobId: string): string;
|
|
4
|
+
export declare function resolveMaxPanes(): number;
|
|
5
|
+
export declare function assertTmux(): void;
|
|
2
6
|
export declare function registerAgent(): BranchDef;
|