ptbk 0.119.0-21 → 0.119.0-26
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 +16 -9
- package/dist/browser/browser.d.ts +50 -36
- package/dist/browser/browser.js +162 -118
- package/dist/browser/browser.js.map +1 -1
- package/dist/browser/fleet.d.ts +59 -0
- package/dist/browser/fleet.js +148 -0
- package/dist/browser/fleet.js.map +1 -0
- package/dist/browser/recording.js +2 -2
- package/dist/browser/recording.js.map +1 -1
- package/dist/chats/conversation.d.ts +1 -1
- package/dist/chats/conversation.js +8 -6
- package/dist/chats/conversation.js.map +1 -1
- package/dist/chats/local.js +5 -5
- package/dist/chats/local.js.map +1 -1
- package/dist/cli/commands/add.js +1 -1
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/boilerplates.js +1 -1
- package/dist/cli/commands/boilerplates.js.map +1 -1
- package/dist/cli/commands/find.js +1 -1
- package/dist/cli/commands/find.js.map +1 -1
- package/dist/cli/commands/fix.js +9 -4
- package/dist/cli/commands/fix.js.map +1 -1
- package/dist/cli/commands/init.d.ts +5 -0
- package/dist/cli/commands/init.js +279 -118
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/migrate.js +1 -1
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/ping.js +20 -12
- package/dist/cli/commands/ping.js.map +1 -1
- package/dist/cli/commands/plan.js +20 -12
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/restart.js +6 -5
- package/dist/cli/commands/restart.js.map +1 -1
- package/dist/cli/commands/run.js +26 -15
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/start.js +11 -7
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/tool.d.ts +19 -0
- package/dist/cli/commands/tool.js +320 -0
- package/dist/cli/commands/tool.js.map +1 -0
- package/dist/cli/commands/verify.js +1 -1
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/common.d.ts +7 -1
- package/dist/cli/common.js +37 -20
- package/dist/cli/common.js.map +1 -1
- package/dist/cli/compatibility.d.ts +8 -0
- package/dist/cli/compatibility.js +32 -0
- package/dist/cli/compatibility.js.map +1 -0
- package/dist/cli/parser.js +7 -3
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/registry.js +182 -7
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/service-view.js +1 -1
- package/dist/cli/service-view.js.map +1 -1
- package/dist/cli/sources.js +2 -0
- package/dist/cli/sources.js.map +1 -1
- package/dist/cli/spec.js +8 -6
- package/dist/cli/spec.js.map +1 -1
- package/dist/common/naming.d.ts +53 -0
- package/dist/common/naming.js +90 -0
- package/dist/common/naming.js.map +1 -0
- package/dist/engine/agenda.d.ts +70 -9
- package/dist/engine/agenda.js +294 -61
- package/dist/engine/agenda.js.map +1 -1
- package/dist/engine/executor.d.ts +5 -0
- package/dist/engine/executor.js +24 -11
- package/dist/engine/executor.js.map +1 -1
- package/dist/engine/harnesses.d.ts +82 -18
- package/dist/engine/harnesses.js +191 -39
- package/dist/engine/harnesses.js.map +1 -1
- package/dist/engine/preview.js +2 -2
- package/dist/engine/preview.js.map +1 -1
- package/dist/engine/routing.d.ts +10 -0
- package/dist/engine/routing.js +67 -28
- package/dist/engine/routing.js.map +1 -1
- package/dist/engine/snapshot.d.ts +107 -7
- package/dist/engine/state.d.ts +4 -2
- package/dist/engine/state.js.map +1 -1
- package/dist/engine/sync.d.ts +96 -0
- package/dist/engine/sync.js +199 -0
- package/dist/engine/sync.js.map +1 -0
- package/dist/engine/team.d.ts +1 -0
- package/dist/engine/team.js +12 -8
- package/dist/engine/team.js.map +1 -1
- package/dist/expert/_main.md +96 -67
- package/dist/expert/agents/_index.md +10 -7
- package/dist/expert/agents/core-agents.md +4 -2
- package/dist/expert/agents/fixer.md +15 -12
- package/dist/expert/cli/acceptance.md +96 -78
- package/dist/expert/cli/api.md +26 -14
- package/dist/expert/cli/autonomous-operation.md +17 -19
- package/dist/expert/cli/browser.md +24 -24
- package/dist/expert/cli/checks.md +18 -10
- package/dist/expert/cli/cli.md +48 -41
- package/dist/expert/cli/configuration-migrations.md +43 -0
- package/dist/expert/cli/configuration.md +24 -14
- package/dist/expert/cli/controls.md +23 -11
- package/dist/expert/cli/dashboard-details.md +28 -10
- package/dist/expert/cli/dashboard-layout.md +15 -15
- package/dist/expert/cli/dashboard.md +8 -10
- package/dist/expert/cli/environment.md +33 -0
- package/dist/expert/cli/execution.md +10 -8
- package/dist/expert/cli/git-persistence.md +27 -21
- package/dist/expert/cli/git-preflight.md +8 -4
- package/dist/expert/cli/git-synchronization.md +32 -6
- package/dist/expert/cli/harness-plugins.md +12 -12
- package/dist/expert/cli/harnesses.md +22 -16
- package/dist/expert/cli/initialization-ui.md +14 -14
- package/dist/expert/cli/initialization.md +31 -21
- package/dist/expert/cli/installation.md +6 -0
- package/dist/expert/cli/isolation.md +5 -3
- package/dist/expert/cli/releasing.md +17 -3
- package/dist/expert/cli/retries.md +10 -8
- package/dist/expert/cli/run.md +7 -5
- package/dist/expert/cli/start.md +21 -15
- package/dist/expert/cli/status-view.md +15 -17
- package/dist/expert/cli/synchronization-setup.md +24 -0
- package/dist/expert/cli/terminal.md +14 -16
- package/dist/expert/cli/tool-management.md +60 -0
- package/dist/expert/cli/tool-runtime.md +35 -0
- package/dist/expert/cli/tools-migration.md +50 -0
- package/dist/expert/cli/tools.md +73 -0
- package/dist/expert/cli/trace-configuration.md +9 -11
- package/dist/expert/cli/updates.md +7 -7
- package/dist/expert/cli/windows-installer.md +67 -0
- package/dist/expert/cli/workspace.md +2 -0
- package/dist/expert/coding-standards/_index.md +11 -0
- package/dist/expert/coding-standards/naming.md +30 -0
- package/dist/expert/coding-standards/shared-logic.md +27 -0
- package/dist/expert/concepts/automatic-repair.md +33 -0
- package/dist/expert/concepts/engine-and-project.md +7 -5
- package/dist/expert/dictionary.md +18 -18
- package/dist/harness/plugins/claude-code/index.js +4 -2
- package/dist/harness/plugins/claude-code/index.js.map +1 -1
- package/dist/harness/plugins/cline/index.js +1 -0
- package/dist/harness/plugins/cline/index.js.map +1 -1
- package/dist/harness/plugins/gemini/index.js +2 -0
- package/dist/harness/plugins/gemini/index.js.map +1 -1
- package/dist/harness/plugins/github-copilot/index.js +1 -0
- package/dist/harness/plugins/github-copilot/index.js.map +1 -1
- package/dist/harness/plugins/openai-codex/index.js +13 -9
- package/dist/harness/plugins/openai-codex/index.js.map +1 -1
- package/dist/harness/plugins/opencode/index.js +1 -0
- package/dist/harness/plugins/opencode/index.js.map +1 -1
- package/dist/harness/plugins/qwen-code/index.js +1 -0
- package/dist/harness/plugins/qwen-code/index.js.map +1 -1
- package/dist/harness/types.d.ts +16 -5
- package/dist/project/config.d.ts +135 -48
- package/dist/project/config.js +331 -119
- package/dist/project/config.js.map +1 -1
- package/dist/project/configuration.d.ts +43 -0
- package/dist/project/configuration.js +165 -0
- package/dist/project/configuration.js.map +1 -0
- package/dist/project/defaults.d.ts +4 -2
- package/dist/project/defaults.js +10 -5
- package/dist/project/defaults.js.map +1 -1
- package/dist/project/git.d.ts +28 -0
- package/dist/project/git.js +81 -0
- package/dist/project/git.js.map +1 -1
- package/dist/project/migrations.d.ts +96 -0
- package/dist/project/migrations.js +301 -0
- package/dist/project/migrations.js.map +1 -0
- package/dist/project/publication.d.ts +57 -0
- package/dist/project/publication.js +117 -0
- package/dist/project/publication.js.map +1 -0
- package/dist/project/readiness.d.ts +14 -5
- package/dist/project/readiness.js +23 -22
- package/dist/project/readiness.js.map +1 -1
- package/dist/project/setup.js +2 -0
- package/dist/project/setup.js.map +1 -1
- package/dist/service/actions.d.ts +12 -4
- package/dist/service/actions.js +32 -2
- package/dist/service/actions.js.map +1 -1
- package/dist/service/control.d.ts +1 -1
- package/dist/service/control.js +1 -1
- package/dist/service/host.d.ts +5 -2
- package/dist/service/host.js +26 -16
- package/dist/service/host.js.map +1 -1
- package/dist/service/http.js +7 -2
- package/dist/service/http.js.map +1 -1
- package/dist/service/launcher.d.ts +2 -1
- package/dist/service/launcher.js +1 -0
- package/dist/service/launcher.js.map +1 -1
- package/dist/service/records.d.ts +3 -0
- package/dist/service/records.js +1 -1
- package/dist/service/records.js.map +1 -1
- package/dist/service/spa/app.css +39 -0
- package/dist/service/spa/app.js +242 -39
- package/dist/service/worker.js +1 -0
- package/dist/service/worker.js.map +1 -1
- package/dist/tools/environment.d.ts +122 -0
- package/dist/tools/environment.js +199 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/model.d.ts +180 -0
- package/dist/tools/model.js +111 -0
- package/dist/tools/model.js.map +1 -0
- package/dist/tools/normalize.d.ts +51 -0
- package/dist/tools/normalize.js +321 -0
- package/dist/tools/normalize.js.map +1 -0
- package/dist/tools/operations.d.ts +198 -0
- package/dist/tools/operations.js +378 -0
- package/dist/tools/operations.js.map +1 -0
- package/dist/tools/readiness.d.ts +72 -0
- package/dist/tools/readiness.js +160 -0
- package/dist/tools/readiness.js.map +1 -0
- package/dist/ui/dashboard.d.ts +3 -0
- package/dist/ui/dashboard.js +173 -2
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/details.d.ts +35 -1
- package/dist/ui/details.js +103 -2
- package/dist/ui/details.js.map +1 -1
- package/dist/ui/secret.d.ts +8 -0
- package/dist/ui/secret.js +41 -0
- package/dist/ui/secret.js.map +1 -0
- package/dist/ui/status-view.d.ts +1 -0
- package/dist/ui/status-view.js +33 -8
- package/dist/ui/status-view.js.map +1 -1
- package/dist/ui/tool-forms.d.ts +24 -0
- package/dist/ui/tool-forms.js +133 -0
- package/dist/ui/tool-forms.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparison key of a fixed system-defined enum value, tolerant to case and separators (`yes-and-fail`,
|
|
3
|
+
* `Yes And Fail` and `YES_AND_FAIL` share the key `YES_AND_FAIL`).
|
|
4
|
+
*
|
|
5
|
+
* @private configuration naming contract
|
|
6
|
+
*/
|
|
7
|
+
export declare function enumKey(raw: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Canonical saved spelling (SCREAMING_SNAKE_CASE) of an internal kebab-case enum value (`yes-and-fail` →
|
|
10
|
+
* `YES_AND_FAIL`, `openai-codex` → `OPENAI_CODEX`).
|
|
11
|
+
*
|
|
12
|
+
* @private configuration naming contract
|
|
13
|
+
*/
|
|
14
|
+
export declare function canonicalEnumValue(value: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Resolves a tolerant spelling to one allowed value (case and separator differences only); `undefined` when the
|
|
17
|
+
* spelling matches no allowed value or is ambiguous.
|
|
18
|
+
*
|
|
19
|
+
* @private configuration naming contract
|
|
20
|
+
*/
|
|
21
|
+
export declare function matchEnum<T extends string>(raw: unknown, allowed: readonly T[]): T | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Pattern of a canonical user-defined configuration identifier (lowercase kebab-case).
|
|
24
|
+
*
|
|
25
|
+
* @private configuration naming contract
|
|
26
|
+
*/
|
|
27
|
+
export declare const KEBAB_IDENTIFIER: RegExp;
|
|
28
|
+
/**
|
|
29
|
+
* Canonical kebab-case identifier of a tolerant spelling (`Work Browser` → `work-browser`, `codex_company` →
|
|
30
|
+
* `codex-company`); `undefined` when nothing usable remains.
|
|
31
|
+
*
|
|
32
|
+
* @private configuration naming contract
|
|
33
|
+
*/
|
|
34
|
+
export declare function kebabIdentifier(raw: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Comparison key of a JSON property name, tolerant to case and separators (`is-enabled`, `IsEnabled` and
|
|
37
|
+
* `is_enabled` all compare equal to `isEnabled`).
|
|
38
|
+
*
|
|
39
|
+
* @private configuration naming contract
|
|
40
|
+
*/
|
|
41
|
+
export declare function propertyKey(raw: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Finds the canonical property among known names for a tolerant spelling.
|
|
44
|
+
*
|
|
45
|
+
* @private configuration naming contract
|
|
46
|
+
*/
|
|
47
|
+
export declare function matchProperty(raw: string, known: readonly string[]): string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Pattern of a supported environment-variable name.
|
|
50
|
+
*
|
|
51
|
+
* @private configuration naming contract
|
|
52
|
+
*/
|
|
53
|
+
export declare const ENVIRONMENT_NAME: RegExp;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparison key of a fixed system-defined enum value, tolerant to case and separators (`yes-and-fail`,
|
|
3
|
+
* `Yes And Fail` and `YES_AND_FAIL` share the key `YES_AND_FAIL`).
|
|
4
|
+
*
|
|
5
|
+
* @private configuration naming contract
|
|
6
|
+
*/
|
|
7
|
+
export function enumKey(raw) {
|
|
8
|
+
return raw
|
|
9
|
+
.trim()
|
|
10
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1_$2')
|
|
11
|
+
.toUpperCase()
|
|
12
|
+
.replace(/[^A-Z0-9]+/g, '_')
|
|
13
|
+
.replace(/^_+|_+$/g, '');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Canonical saved spelling (SCREAMING_SNAKE_CASE) of an internal kebab-case enum value (`yes-and-fail` →
|
|
17
|
+
* `YES_AND_FAIL`, `openai-codex` → `OPENAI_CODEX`).
|
|
18
|
+
*
|
|
19
|
+
* @private configuration naming contract
|
|
20
|
+
*/
|
|
21
|
+
export function canonicalEnumValue(value) {
|
|
22
|
+
return value.toUpperCase().replace(/-/g, '_');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolves a tolerant spelling to one allowed value (case and separator differences only); `undefined` when the
|
|
26
|
+
* spelling matches no allowed value or is ambiguous.
|
|
27
|
+
*
|
|
28
|
+
* @private configuration naming contract
|
|
29
|
+
*/
|
|
30
|
+
export function matchEnum(raw, allowed) {
|
|
31
|
+
if (typeof raw !== 'string' || !raw.trim())
|
|
32
|
+
return undefined;
|
|
33
|
+
const exact = allowed.find((value) => value === raw);
|
|
34
|
+
if (exact)
|
|
35
|
+
return exact;
|
|
36
|
+
const key = enumKey(raw);
|
|
37
|
+
const matches = allowed.filter((value) => enumKey(value) === key);
|
|
38
|
+
return matches.length === 1 ? matches[0] : undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Pattern of a canonical user-defined configuration identifier (lowercase kebab-case).
|
|
42
|
+
*
|
|
43
|
+
* @private configuration naming contract
|
|
44
|
+
*/
|
|
45
|
+
export const KEBAB_IDENTIFIER = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
46
|
+
/**
|
|
47
|
+
* Canonical kebab-case identifier of a tolerant spelling (`Work Browser` → `work-browser`, `codex_company` →
|
|
48
|
+
* `codex-company`); `undefined` when nothing usable remains.
|
|
49
|
+
*
|
|
50
|
+
* @private configuration naming contract
|
|
51
|
+
*/
|
|
52
|
+
export function kebabIdentifier(raw) {
|
|
53
|
+
const value = raw
|
|
54
|
+
.trim()
|
|
55
|
+
.normalize('NFKD')
|
|
56
|
+
.replace(/[̀-ͯ]/g, '')
|
|
57
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
58
|
+
.toLowerCase()
|
|
59
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
60
|
+
.replace(/^-+|-+$/g, '');
|
|
61
|
+
return value || undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Comparison key of a JSON property name, tolerant to case and separators (`is-enabled`, `IsEnabled` and
|
|
65
|
+
* `is_enabled` all compare equal to `isEnabled`).
|
|
66
|
+
*
|
|
67
|
+
* @private configuration naming contract
|
|
68
|
+
*/
|
|
69
|
+
export function propertyKey(raw) {
|
|
70
|
+
return raw.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Finds the canonical property among known names for a tolerant spelling.
|
|
74
|
+
*
|
|
75
|
+
* @private configuration naming contract
|
|
76
|
+
*/
|
|
77
|
+
export function matchProperty(raw, known) {
|
|
78
|
+
if (known.includes(raw))
|
|
79
|
+
return raw;
|
|
80
|
+
const key = propertyKey(raw);
|
|
81
|
+
const matches = known.filter((name) => propertyKey(name) === key);
|
|
82
|
+
return matches.length === 1 ? matches[0] : undefined;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Pattern of a supported environment-variable name.
|
|
86
|
+
*
|
|
87
|
+
* @private configuration naming contract
|
|
88
|
+
*/
|
|
89
|
+
export const ENVIRONMENT_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
90
|
+
//# sourceMappingURL=naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.js","sourceRoot":"","sources":["../../src/common/naming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IAC/B,OAAO,GAAG;SACL,IAAI,EAAE;SACN,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC5C,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAmB,GAAY,EAAE,OAAqB;IAC3E,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,SAAS,CAAC;IAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC;IACrD,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACzB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;IAClE,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,GAAG;SACZ,IAAI,EAAE;SACN,SAAS,CAAC,MAAM,CAAC;SACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7B,OAAO,KAAK,IAAI,SAAS,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,KAAwB;IAC/D,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAClE,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC"}
|
package/dist/engine/agenda.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { type EffectiveSettings } from '../project/config.js';
|
|
1
|
+
import { type BrowserOverrides, type EffectiveSettings } from '../project/config.js';
|
|
2
2
|
import { ChatStore, type ChatSummary, type ChatWrite } from '../chats/store.js';
|
|
3
3
|
import { type ChatAgentChoice, type ChatDetail } from '../chats/service.js';
|
|
4
4
|
import type { Project } from '../project/workspace.js';
|
|
5
5
|
import { type Task } from '../tasks/model.js';
|
|
6
6
|
import type { BridgeTool } from './bridge.js';
|
|
7
7
|
import { type ExecutionOutcome } from './executor.js';
|
|
8
|
+
import { type SyncOutcome } from './sync.js';
|
|
9
|
+
import { type ToolOperationOutcome, type ToolOperationRequest } from '../tools/operations.js';
|
|
8
10
|
import type { TaskChats } from '../chats/task-chats.js';
|
|
9
11
|
import { type RunSelection } from './routing.js';
|
|
10
12
|
import type { ActivityView, BrowserDetailView, ConnectionView, ExecutionContextView, ServiceSnapshot } from './snapshot.js';
|
|
@@ -45,8 +47,10 @@ export type AgendaOptions = {
|
|
|
45
47
|
readonly env: NodeJS.ProcessEnv;
|
|
46
48
|
/** CLI setting overrides by key (parsed values). */
|
|
47
49
|
readonly cli: Readonly<Record<string, unknown>>;
|
|
48
|
-
/** CLI harness restriction. */
|
|
50
|
+
/** CLI harness restriction (variants or named instances). */
|
|
49
51
|
readonly cliHarnesses?: readonly string[];
|
|
52
|
+
/** Temporary browser overrides of one named browser tool. */
|
|
53
|
+
readonly cliBrowser?: BrowserOverrides;
|
|
50
54
|
/** `--tasks` (absolute), overriding `paths.tasks`. */
|
|
51
55
|
readonly tasksDirectory?: string;
|
|
52
56
|
/** Persistence state for status views. */
|
|
@@ -74,8 +78,12 @@ export type AgendaOptions = {
|
|
|
74
78
|
readonly finalizeEvidence?: (trace: TaskTrace) => Promise<void>;
|
|
75
79
|
/** Releases per-task resources after every executed piece of work, whatever its outcome. */
|
|
76
80
|
readonly afterWork?: () => Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
readonly
|
|
81
|
+
/** Named browser tools owned by the service: inspections for the detail panels and the names held by work. */
|
|
82
|
+
readonly browsers?: {
|
|
83
|
+
readonly primary: () => BrowserDetailView | undefined;
|
|
84
|
+
readonly all: () => BrowserDetailView[];
|
|
85
|
+
readonly inUse: () => string[];
|
|
86
|
+
};
|
|
79
87
|
};
|
|
80
88
|
/**
|
|
81
89
|
* Summary returned when the agenda ends.
|
|
@@ -169,9 +177,18 @@ export declare class Agenda {
|
|
|
169
177
|
private lastHarnessMaintenance;
|
|
170
178
|
private readonly watchers;
|
|
171
179
|
private wakeTimer?;
|
|
180
|
+
private configTimer?;
|
|
172
181
|
private lastPersistenceRetry;
|
|
173
182
|
private nextKnownTime?;
|
|
174
183
|
private finishedSummary?;
|
|
184
|
+
/** Readiness of the enabled browser tools (inspected without launching them). */
|
|
185
|
+
private browserReadiness;
|
|
186
|
+
/** The shared tool inventory as of the last refresh. */
|
|
187
|
+
private tools;
|
|
188
|
+
/** Required configuration work that could not be persisted yet (why no new work starts). */
|
|
189
|
+
private configurationPending?;
|
|
190
|
+
/** Opt-in Git synchronization (one coordinator for timer, boundaries and manual cycles). */
|
|
191
|
+
private readonly sync;
|
|
175
192
|
constructor(options: AgendaOptions);
|
|
176
193
|
/** The project's chats (each human-facing message is its own commit unless explicitly uncommitted). */
|
|
177
194
|
get chats(): ChatStore;
|
|
@@ -345,7 +362,28 @@ export declare class Agenda {
|
|
|
345
362
|
* The shared status snapshot.
|
|
346
363
|
*/
|
|
347
364
|
snapshot(): ServiceSnapshot;
|
|
348
|
-
/**
|
|
365
|
+
/** Loads the effective settings of this engine (saved configuration plus invocation overrides). */
|
|
366
|
+
private loadEffectiveSettings;
|
|
367
|
+
/**
|
|
368
|
+
* Applies required configuration evolution through the shared coordinator: a committed migration pass when this
|
|
369
|
+
* engine is newer, and deterministic spelling corrections as their own commit. A pass that cannot be persisted
|
|
370
|
+
* (explicit no-commit, someone's uncommitted ptbk.json edits, an older engine, a failed commit) keeps the engine
|
|
371
|
+
* controllable and visibly stops new work instead of using an untracked configuration.
|
|
372
|
+
*/
|
|
373
|
+
private maintainConfiguration;
|
|
374
|
+
/** Names of tools held by active work (the task's harness instance, active consultations, acquired browsers). */
|
|
375
|
+
private toolsInUse;
|
|
376
|
+
/** Tools whose acquired old configuration active work still uses (changed, disabled or removed meanwhile). */
|
|
377
|
+
private retainedTools;
|
|
378
|
+
/**
|
|
379
|
+
* Re-reads the tool inventory and `.env`, reinspecting changed and new instances (no browser launch, no model
|
|
380
|
+
* call). Runs before every task, while idle or waiting, and when ptbk.json/.env change during active work: a
|
|
381
|
+
* new usable tool can serve the current task at its next selection.
|
|
382
|
+
*/
|
|
383
|
+
private refreshTools;
|
|
384
|
+
/** Live refresh after an external change of ptbk.json or .env (another terminal, manual edit, synchronization). */
|
|
385
|
+
private refreshLive;
|
|
386
|
+
/** Reloads settings, agents, repository facts, tool readiness and configuration compatibility. */
|
|
349
387
|
private refreshContext;
|
|
350
388
|
/** Reloads chat summaries (waiting-for-user first) into the view. */
|
|
351
389
|
private refreshChats;
|
|
@@ -413,6 +451,11 @@ export declare class Agenda {
|
|
|
413
451
|
private execute;
|
|
414
452
|
/** Executes claimed work (the service owns it until its outcome is handled). */
|
|
415
453
|
private executeClaimed;
|
|
454
|
+
/**
|
|
455
|
+
* The next usable instance of the failed instance's variant, unless the task explicitly requires one instance
|
|
456
|
+
* (an explicit restriction is never broadened to another account).
|
|
457
|
+
*/
|
|
458
|
+
private sameVariantFallback;
|
|
416
459
|
/**
|
|
417
460
|
* Executes ordinary tasks in an isolated worktree when requested (generated work stays in the checkout).
|
|
418
461
|
*/
|
|
@@ -438,10 +481,26 @@ export declare class Agenda {
|
|
|
438
481
|
* Runs the optional pre-work check once (`--check-before`); failures block (fail) or become a repair task (fix).
|
|
439
482
|
*/
|
|
440
483
|
private checkBeforeWork;
|
|
441
|
-
/**
|
|
442
|
-
private
|
|
443
|
-
/**
|
|
444
|
-
|
|
484
|
+
/** Publishes completed local work through the synchronization coordinator (failures stay pending, never rerun work). */
|
|
485
|
+
private publish;
|
|
486
|
+
/**
|
|
487
|
+
* Why integrating remote changes now would be unsafe: work in progress (integration waits for the task boundary)
|
|
488
|
+
* or uncommitted local edits of the same files (never overwritten, stashed or reset).
|
|
489
|
+
*/
|
|
490
|
+
private integrationBlocker;
|
|
491
|
+
/**
|
|
492
|
+
* Hands a merge needing judgment to the ordinary Fixer (one unfinished task per condition; no new channel). The
|
|
493
|
+
* local branch is unchanged: the merge was aborted, so local tasks continue meanwhile.
|
|
494
|
+
*/
|
|
495
|
+
private scheduleSyncConflict;
|
|
496
|
+
/** One manual synchronization cycle through the shared coordinator (never a second scheduler). */
|
|
497
|
+
synchronizeNow(): Promise<SyncOutcome>;
|
|
498
|
+
/**
|
|
499
|
+
* Applies one saved tool-management operation under this engine's coordination: the same shared implementation as
|
|
500
|
+
* a stopped project's CLI, with the in-use set of active work, the Git lock and synchronization attempts. The new
|
|
501
|
+
* inventory is effective at once, also for the task running now.
|
|
502
|
+
*/
|
|
503
|
+
toolOperation(request: ToolOperationRequest): Promise<ToolOperationOutcome>;
|
|
445
504
|
/**
|
|
446
505
|
* Checkpoints a task waiting for a person (answer or recovery decision) and releases execution so independent
|
|
447
506
|
* work can continue — only when it holds no uncommitted changes. Otherwise the wait stays a project-wide blocker
|
|
@@ -487,6 +546,8 @@ export declare function executionContextView(input: {
|
|
|
487
546
|
readonly agent: string;
|
|
488
547
|
readonly by?: string;
|
|
489
548
|
readonly harness: string;
|
|
549
|
+
/** Named tool instance actually used. */
|
|
550
|
+
readonly tool?: string;
|
|
490
551
|
readonly harnessVersion?: string;
|
|
491
552
|
readonly model?: string;
|
|
492
553
|
readonly modelReported?: boolean;
|