wicked-crew 0.7.25 → 0.7.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/dist/api/endpoint-manifest-live.d.ts.map +1 -1
- package/dist/api/endpoint-manifest-live.js +5 -0
- package/dist/api/endpoint-manifest-live.js.map +1 -1
- package/dist/api/eval-compare.d.ts +306 -0
- package/dist/api/eval-compare.d.ts.map +1 -0
- package/dist/api/eval-compare.js +610 -0
- package/dist/api/eval-compare.js.map +1 -0
- package/dist/api/eval-sample.d.ts +158 -0
- package/dist/api/eval-sample.d.ts.map +1 -0
- package/dist/api/eval-sample.js +88 -0
- package/dist/api/eval-sample.js.map +1 -0
- package/dist/api/routes.d.ts +5 -0
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +31 -0
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-files.d.ts +12 -2
- package/dist/api/run-files.d.ts.map +1 -1
- package/dist/api/run-files.js +17 -5
- package/dist/api/run-files.js.map +1 -1
- package/dist/api/server.d.ts +20 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +62 -9
- package/dist/api/server.js.map +1 -1
- package/dist/api/skills.d.ts +88 -0
- package/dist/api/skills.d.ts.map +1 -0
- package/dist/api/skills.js +264 -0
- package/dist/api/skills.js.map +1 -0
- package/dist/api/testing.d.ts +2 -75
- package/dist/api/testing.d.ts.map +1 -1
- package/dist/api/testing.js +14 -28
- package/dist/api/testing.js.map +1 -1
- package/dist/core/adapter.d.ts +42 -0
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +83 -12
- package/dist/core/adapter.js.map +1 -1
- package/dist/interactive/bridge-root.d.ts +117 -7
- package/dist/interactive/bridge-root.d.ts.map +1 -1
- package/dist/interactive/bridge-root.js +229 -9
- package/dist/interactive/bridge-root.js.map +1 -1
- package/dist/interactive/doc-delete-routes.d.ts +2 -0
- package/dist/interactive/doc-delete-routes.d.ts.map +1 -1
- package/dist/interactive/doc-delete-routes.js +3 -19
- package/dist/interactive/doc-delete-routes.js.map +1 -1
- package/dist/interactive/doc-list-routes.d.ts +42 -0
- package/dist/interactive/doc-list-routes.d.ts.map +1 -0
- package/dist/interactive/doc-list-routes.js +165 -0
- package/dist/interactive/doc-list-routes.js.map +1 -0
- package/dist/interactive/project-root.d.ts +36 -0
- package/dist/interactive/project-root.d.ts.map +1 -0
- package/dist/interactive/project-root.js +45 -0
- package/dist/interactive/project-root.js.map +1 -0
- package/dist/interactive/proxy-routes.d.ts +4 -1
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +4 -22
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/projects/default-project.d.ts +10 -0
- package/dist/projects/default-project.d.ts.map +1 -0
- package/dist/projects/default-project.js +10 -0
- package/dist/projects/default-project.js.map +1 -0
- package/dist/projects/routes.d.ts +0 -2
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +1 -2
- package/dist/projects/routes.js.map +1 -1
- package/dist/skills/bundle.d.ts +94 -0
- package/dist/skills/bundle.d.ts.map +1 -0
- package/dist/skills/bundle.js +187 -0
- package/dist/skills/bundle.js.map +1 -0
- package/dist/skills/contain.d.ts +57 -0
- package/dist/skills/contain.d.ts.map +1 -0
- package/dist/skills/contain.js +90 -0
- package/dist/skills/contain.js.map +1 -0
- package/dist/skills/core-closure.d.ts +83 -0
- package/dist/skills/core-closure.d.ts.map +1 -0
- package/dist/skills/core-closure.js +130 -0
- package/dist/skills/core-closure.js.map +1 -0
- package/dist/skills/engine-env.d.ts +48 -0
- package/dist/skills/engine-env.d.ts.map +1 -0
- package/dist/skills/engine-env.js +69 -0
- package/dist/skills/engine-env.js.map +1 -0
- package/dist/skills/frontmatter.d.ts +77 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/frontmatter.js +190 -0
- package/dist/skills/frontmatter.js.map +1 -0
- package/dist/skills/guards.d.ts +72 -0
- package/dist/skills/guards.d.ts.map +1 -0
- package/dist/skills/guards.js +147 -0
- package/dist/skills/guards.js.map +1 -0
- package/dist/skills/live-generations.d.ts +80 -0
- package/dist/skills/live-generations.d.ts.map +1 -0
- package/dist/skills/live-generations.js +163 -0
- package/dist/skills/live-generations.js.map +1 -0
- package/dist/skills/plugin-source.d.ts +109 -0
- package/dist/skills/plugin-source.d.ts.map +1 -0
- package/dist/skills/plugin-source.js +272 -0
- package/dist/skills/plugin-source.js.map +1 -0
- package/dist/skills/refs.d.ts +58 -0
- package/dist/skills/refs.d.ts.map +1 -0
- package/dist/skills/refs.js +133 -0
- package/dist/skills/refs.js.map +1 -0
- package/dist/skills/root-fence.d.ts +53 -0
- package/dist/skills/root-fence.d.ts.map +1 -0
- package/dist/skills/root-fence.js +109 -0
- package/dist/skills/root-fence.js.map +1 -0
- package/dist/skills/root-names.d.ts +42 -0
- package/dist/skills/root-names.d.ts.map +1 -0
- package/dist/skills/root-names.js +44 -0
- package/dist/skills/root-names.js.map +1 -0
- package/dist/skills/runtime.d.ts +130 -0
- package/dist/skills/runtime.d.ts.map +1 -0
- package/dist/skills/runtime.js +246 -0
- package/dist/skills/runtime.js.map +1 -0
- package/dist/skills/store.d.ts +895 -0
- package/dist/skills/store.d.ts.map +1 -0
- package/dist/skills/store.js +3575 -0
- package/dist/skills/store.js.map +1 -0
- package/dist/skills/tree.d.ts +292 -0
- package/dist/skills/tree.d.ts.map +1 -0
- package/dist/skills/tree.js +645 -0
- package/dist/skills/tree.js.map +1 -0
- package/dist/skills/venv.d.ts +52 -0
- package/dist/skills/venv.d.ts.map +1 -0
- package/dist/skills/venv.js +80 -0
- package/dist/skills/venv.js.map +1 -0
- package/dist/studio/assets/index-CK1uJWs2.css +32 -0
- package/dist/studio/assets/index-FcZg3WDR.js +539 -0
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +605 -7
- package/endpoint-manifest.json +183 -1
- package/package.json +4 -3
- package/dist/studio/assets/index-C4iz4uAw.js +0 -537
- package/dist/studio/assets/index-DEEQcRQ_.css +0 -32
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The skills seam as the daemon holds it: ONE store over `<state home>/skills` + the one thing the
|
|
3
|
+
* daemon derives from it — the engine env (`WICKED_SKILLS_SNAPSHOT`).
|
|
4
|
+
*
|
|
5
|
+
* `apply()` is called at boot (`createServer`), after the root passed the fence (root-fence.ts):
|
|
6
|
+
* seed from the live plugin when the root is empty, publish a first snapshot when none exists,
|
|
7
|
+
* export the resolved snapshot path. There is NO skills setting to re-apply on `PUT /settings` —
|
|
8
|
+
* the root is `<state home>/skills`, full stop (design v3.1 §1 one storage root; v3.2 §1 never a
|
|
9
|
+
* user CLI directory; codex round 5 on #480 retired `skills_root` and `WICKED_CREW_SKILLS_ROOT`:
|
|
10
|
+
* a configurable root let seeding write into `~/.codex/skills`). `apply` never throws — but it does
|
|
11
|
+
* NOT fail open either. The degradation ladder (design v3 §3; codex review of #480) distinguishes
|
|
12
|
+
* three outcomes:
|
|
13
|
+
*
|
|
14
|
+
* published `current` verified → `WICKED_SKILLS_SNAPSHOT=<resolved snapshot>`.
|
|
15
|
+
* fallback ABSENT configuration — no wicked-garden installed, nothing to seed from. The ONE
|
|
16
|
+
* case the engine input is restored to the value this process booted with (an
|
|
17
|
+
* operator export or the test harness's arming survives; unset when there was
|
|
18
|
+
* none): the engine's own ladder falls back to the live installed cache and logs
|
|
19
|
+
* `skills.fallback`. Finding `skills.fallback` (warning). The log line says which
|
|
20
|
+
* of the two happened — "restored to <value>" or "left unset" — never one for the
|
|
21
|
+
* other (Copilot on #480).
|
|
22
|
+
* blocked the FIRST publish is blocked (a defective catalog: a reference that ESCAPES the
|
|
23
|
+
* plugin root, a missing required skill, a missing plugin catalog, a file outside
|
|
24
|
+
* the bundle closure, a baseline env that could not be provisioned — a reference
|
|
25
|
+
* whose target is merely MISSING is a warning and publishes, design v3.4 §1).
|
|
26
|
+
* There is no snapshot to offer and the live cache is NOT a
|
|
27
|
+
* substitute — the engine input is pointed at a path that does not exist
|
|
28
|
+
* (`<root>/refused/skills.blocked`), which the engine treats as an invalid explicit
|
|
29
|
+
* path: every launch fails loudly naming it until the operator fixes the catalog
|
|
30
|
+
* and publishes. Finding `skills.blocked` (error).
|
|
31
|
+
* config-error an INVALID configuration — a corrupt manifest, a `current` link that fails
|
|
32
|
+
* verification, a root that is not the directory the store bound. Same refusal path
|
|
33
|
+
* (`<root>/refused/skills.config`), same loud launch failure: recorded disablement
|
|
34
|
+
* is never bypassed by "restoring" the live cache. Finding `skills.config` (error).
|
|
35
|
+
*
|
|
36
|
+
* What the engine is handed is EXACTLY ONE variable, `WICKED_SKILLS_SNAPSHOT` = the absolute REAL
|
|
37
|
+
* path of `snapshots/<gen>` (v3.1 §2, v3.4 §2); `WICKED_SKILLS_CURRENT` is withdrawn and never set,
|
|
38
|
+
* and `WICKED_CREW_STATE_HOME` is RETIRED as an engine input (v3.4 §2): core derives the state home
|
|
39
|
+
* it fences from the snapshot path's fixed layout (`<state home>/skills/snapshots/<gen>` — parent
|
|
40
|
+
* `snapshots`, grandparent `skills`, else a config error naming the path). Because the root IS
|
|
41
|
+
* `<state home>/skills` (asserted at boot, identity-checked on every operation), that layout holds
|
|
42
|
+
* by construction. The canonical state home is still REPORTED (`health().stateHome`) for humans.
|
|
43
|
+
*
|
|
44
|
+
* NOTHING here writes into the user's own CLI directories (design v3.2 §1): the v3 additive
|
|
45
|
+
* mirror into the user's codex/pi/copilot/opencode skill dirs is withdrawn, and with it the
|
|
46
|
+
* `skills_mirror` setting. Skills reach non-Claude workers only through the per-launch delivery
|
|
47
|
+
* core performs from the snapshot (the generated `views/copilot/` for copilot, `--skill` lists for
|
|
48
|
+
* pi); a CLI without a lever runs without wicked skills — never through a side channel into the
|
|
49
|
+
* user's home.
|
|
50
|
+
*
|
|
51
|
+
* `health()` is the last outcome, surfaced read-only on `GET /diagnostics` (`skills`).
|
|
52
|
+
*/
|
|
53
|
+
import type { LaunchNotice } from '../core/adapter.js';
|
|
54
|
+
import type { CoreEvent } from '../core/types.js';
|
|
55
|
+
import { REFUSED_DIRNAME } from './root-names.js';
|
|
56
|
+
import { type SkillsStore } from './store.js';
|
|
57
|
+
/** The refusal sentinel directory name — from the ONE table of root names (design v3.5 §2); re-exported for the tests. */
|
|
58
|
+
export { REFUSED_DIRNAME };
|
|
59
|
+
export type SkillsHealthState = 'published' | 'fallback' | 'blocked' | 'config-error' | 'disabled';
|
|
60
|
+
export type SkillsHealthFindingKind = 'skills.fallback' | 'skills.blocked' | 'skills.config';
|
|
61
|
+
export interface SkillsHealthFinding {
|
|
62
|
+
kind: SkillsHealthFindingKind;
|
|
63
|
+
severity: 'warning' | 'error';
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
/** The seam's last outcome — what `GET /diagnostics` reports as `skills`. */
|
|
67
|
+
export interface SkillsHealth {
|
|
68
|
+
state: SkillsHealthState;
|
|
69
|
+
/** The skills root (`<state home>/skills`), or `null` when the daemon booted without the seam. */
|
|
70
|
+
root: string | null;
|
|
71
|
+
/** The verified published snapshot, or `null`. */
|
|
72
|
+
current: {
|
|
73
|
+
gen: number;
|
|
74
|
+
path: string;
|
|
75
|
+
} | null;
|
|
76
|
+
/** What `WICKED_SKILLS_SNAPSHOT` is exported as right now (`null` = unset / boot value). */
|
|
77
|
+
engineInput: string | null;
|
|
78
|
+
/** The canonical daemon state home — reported for HUMANS (`GET /diagnostics`); NOT an engine input
|
|
79
|
+
* (v3.4 §2: core reads only `WICKED_SKILLS_SNAPSHOT` and derives the state home from its layout).
|
|
80
|
+
* `null` when `disabled`. */
|
|
81
|
+
stateHome: string | null;
|
|
82
|
+
findings: SkillsHealthFinding[];
|
|
83
|
+
}
|
|
84
|
+
/** The `skills` block a daemon booted WITHOUT the seam reports. */
|
|
85
|
+
export declare function disabledSkillsHealth(): SkillsHealth;
|
|
86
|
+
/**
|
|
87
|
+
* The path the engine input is pointed at when the daemon has NO valid snapshot to offer and must
|
|
88
|
+
* not fall back: it does not exist, so the engine's "explicit path invalid → launch fails loudly"
|
|
89
|
+
* rung fires, and the path itself names why (`…/refused/skills.blocked`).
|
|
90
|
+
*/
|
|
91
|
+
export declare function refusalPath(root: string, kind: 'skills.blocked' | 'skills.config'): string;
|
|
92
|
+
export interface SkillsRuntimeOptions {
|
|
93
|
+
store: SkillsStore;
|
|
94
|
+
log: (message: string) => void;
|
|
95
|
+
/** The `WICKED_SKILLS_SNAPSHOT` this process BOOTED with (default: the real one, `BOOT_SKILLS_SNAPSHOT`); tests inject `''` / `undefined`. */
|
|
96
|
+
bootSnapshot?: string | undefined;
|
|
97
|
+
}
|
|
98
|
+
export declare class SkillsRuntime {
|
|
99
|
+
readonly store: SkillsStore;
|
|
100
|
+
private readonly log;
|
|
101
|
+
private readonly bootSnapshot;
|
|
102
|
+
private lastHealth;
|
|
103
|
+
constructor(opts: SkillsRuntimeOptions);
|
|
104
|
+
/** The seam's last outcome (diagnostics). */
|
|
105
|
+
health(): SkillsHealth;
|
|
106
|
+
/** Boot entry point. Never throws; never fails open (module header). Idempotent: a seeded, published root is only re-verified. */
|
|
107
|
+
apply(): Promise<SkillsHealth>;
|
|
108
|
+
/**
|
|
109
|
+
* One CoreEvent from the daemon's event listener: pins the generation the engine reports it
|
|
110
|
+
* handed the live run the event belongs to, releases (and reaps) at the run's terminal frame —
|
|
111
|
+
* live-generations.ts.
|
|
112
|
+
*/
|
|
113
|
+
observe(event: CoreEvent): void;
|
|
114
|
+
/**
|
|
115
|
+
* One launch notice from the adapter (`CoreAdapter.onLaunch`): the daemon is handing a run or
|
|
116
|
+
* campaign to the engine — open its launch pin at the generation the env exports right now,
|
|
117
|
+
* BEFORE the engine call, so no spawn can read the env ahead of the pin — or the engine refused
|
|
118
|
+
* it (release the pin; nothing will spawn). The pin is otherwise released only by the engine's
|
|
119
|
+
* `skillsSnapshotHanded` report or the terminal frame — never by publish count (codex round 4).
|
|
120
|
+
*/
|
|
121
|
+
launched(notice: LaunchNotice): void;
|
|
122
|
+
/**
|
|
123
|
+
* Export the VERIFIED current snapshot for the engine — the ONE engine input (v3.4 §2). With
|
|
124
|
+
* nothing published (or an unverifiable `current`) the engine input is NOT touched here — `apply`
|
|
125
|
+
* decided it. Answers the health it recorded, or `null` when there was nothing to export.
|
|
126
|
+
*/
|
|
127
|
+
afterPublish(): SkillsHealth | null;
|
|
128
|
+
private record;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/skills/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAkB5E,0HAA0H;AAC1H,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAE7F,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,kGAAkG;IAClG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,kDAAkD;IAClD,OAAO,EAAE;QAAE,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3
|
+
* daemon derives from it — the engine env (`WICKED_SKILLS_SNAPSHOT`).
|
|
4
|
+
*
|
|
5
|
+
* `apply()` is called at boot (`createServer`), after the root passed the fence (root-fence.ts):
|
|
6
|
+
* seed from the live plugin when the root is empty, publish a first snapshot when none exists,
|
|
7
|
+
* export the resolved snapshot path. There is NO skills setting to re-apply on `PUT /settings` —
|
|
8
|
+
* the root is `<state home>/skills`, full stop (design v3.1 §1 one storage root; v3.2 §1 never a
|
|
9
|
+
* user CLI directory; codex round 5 on #480 retired `skills_root` and `WICKED_CREW_SKILLS_ROOT`:
|
|
10
|
+
* a configurable root let seeding write into `~/.codex/skills`). `apply` never throws — but it does
|
|
11
|
+
* NOT fail open either. The degradation ladder (design v3 §3; codex review of #480) distinguishes
|
|
12
|
+
* three outcomes:
|
|
13
|
+
*
|
|
14
|
+
* published `current` verified → `WICKED_SKILLS_SNAPSHOT=<resolved snapshot>`.
|
|
15
|
+
* fallback ABSENT configuration — no wicked-garden installed, nothing to seed from. The ONE
|
|
16
|
+
* case the engine input is restored to the value this process booted with (an
|
|
17
|
+
* operator export or the test harness's arming survives; unset when there was
|
|
18
|
+
* none): the engine's own ladder falls back to the live installed cache and logs
|
|
19
|
+
* `skills.fallback`. Finding `skills.fallback` (warning). The log line says which
|
|
20
|
+
* of the two happened — "restored to <value>" or "left unset" — never one for the
|
|
21
|
+
* other (Copilot on #480).
|
|
22
|
+
* blocked the FIRST publish is blocked (a defective catalog: a reference that ESCAPES the
|
|
23
|
+
* plugin root, a missing required skill, a missing plugin catalog, a file outside
|
|
24
|
+
* the bundle closure, a baseline env that could not be provisioned — a reference
|
|
25
|
+
* whose target is merely MISSING is a warning and publishes, design v3.4 §1).
|
|
26
|
+
* There is no snapshot to offer and the live cache is NOT a
|
|
27
|
+
* substitute — the engine input is pointed at a path that does not exist
|
|
28
|
+
* (`<root>/refused/skills.blocked`), which the engine treats as an invalid explicit
|
|
29
|
+
* path: every launch fails loudly naming it until the operator fixes the catalog
|
|
30
|
+
* and publishes. Finding `skills.blocked` (error).
|
|
31
|
+
* config-error an INVALID configuration — a corrupt manifest, a `current` link that fails
|
|
32
|
+
* verification, a root that is not the directory the store bound. Same refusal path
|
|
33
|
+
* (`<root>/refused/skills.config`), same loud launch failure: recorded disablement
|
|
34
|
+
* is never bypassed by "restoring" the live cache. Finding `skills.config` (error).
|
|
35
|
+
*
|
|
36
|
+
* What the engine is handed is EXACTLY ONE variable, `WICKED_SKILLS_SNAPSHOT` = the absolute REAL
|
|
37
|
+
* path of `snapshots/<gen>` (v3.1 §2, v3.4 §2); `WICKED_SKILLS_CURRENT` is withdrawn and never set,
|
|
38
|
+
* and `WICKED_CREW_STATE_HOME` is RETIRED as an engine input (v3.4 §2): core derives the state home
|
|
39
|
+
* it fences from the snapshot path's fixed layout (`<state home>/skills/snapshots/<gen>` — parent
|
|
40
|
+
* `snapshots`, grandparent `skills`, else a config error naming the path). Because the root IS
|
|
41
|
+
* `<state home>/skills` (asserted at boot, identity-checked on every operation), that layout holds
|
|
42
|
+
* by construction. The canonical state home is still REPORTED (`health().stateHome`) for humans.
|
|
43
|
+
*
|
|
44
|
+
* NOTHING here writes into the user's own CLI directories (design v3.2 §1): the v3 additive
|
|
45
|
+
* mirror into the user's codex/pi/copilot/opencode skill dirs is withdrawn, and with it the
|
|
46
|
+
* `skills_mirror` setting. Skills reach non-Claude workers only through the per-launch delivery
|
|
47
|
+
* core performs from the snapshot (the generated `views/copilot/` for copilot, `--skill` lists for
|
|
48
|
+
* pi); a CLI without a lever runs without wicked skills — never through a side channel into the
|
|
49
|
+
* user's home.
|
|
50
|
+
*
|
|
51
|
+
* `health()` is the last outcome, surfaced read-only on `GET /diagnostics` (`skills`).
|
|
52
|
+
*/
|
|
53
|
+
import { join } from 'node:path';
|
|
54
|
+
import { applySkillsSnapshotEnv, BOOT_SKILLS_SNAPSHOT, canonicalCrewStateHome, SKILLS_SNAPSHOT_ENGINE_ENV } from './engine-env.js';
|
|
55
|
+
import { SKILLS_SOURCE_ENV } from './plugin-source.js';
|
|
56
|
+
import { REFUSED_DIRNAME } from './root-names.js';
|
|
57
|
+
import { SkillsSourceUnavailableError } from './store.js';
|
|
58
|
+
/**
|
|
59
|
+
* The seed source named for the boot log by what it IS (Copilot on #480: the line used to hard-code
|
|
60
|
+
* "the installed wicked-garden plugin" although an explicit `WICKED_CREW_SKILLS_SOURCE` checkout or
|
|
61
|
+
* directory seeds just as well): its kind, its path and the plugin version it declares — so an
|
|
62
|
+
* operator debugging which bytes were seeded reads the actual root, never an assumption.
|
|
63
|
+
*/
|
|
64
|
+
function describeSeedSource(source) {
|
|
65
|
+
const what = source.kind === 'claude-plugin-cache'
|
|
66
|
+
? 'the installed wicked-garden plugin (Claude plugin cache)'
|
|
67
|
+
: source.kind === 'checkout'
|
|
68
|
+
? `a wicked-garden git checkout (an explicit plugin root — ${SKILLS_SOURCE_ENV} or the configured source)`
|
|
69
|
+
: `a plugin directory (an explicit plugin root — ${SKILLS_SOURCE_ENV} or the configured source)`;
|
|
70
|
+
return `${what} at ${source.path}, plugin version ${source.plugin_version}, source kind ${source.kind}`;
|
|
71
|
+
}
|
|
72
|
+
/** The refusal sentinel directory name — from the ONE table of root names (design v3.5 §2); re-exported for the tests. */
|
|
73
|
+
export { REFUSED_DIRNAME };
|
|
74
|
+
/** The `skills` block a daemon booted WITHOUT the seam reports. */
|
|
75
|
+
export function disabledSkillsHealth() {
|
|
76
|
+
return { state: 'disabled', root: null, current: null, engineInput: null, stateHome: null, findings: [] };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The path the engine input is pointed at when the daemon has NO valid snapshot to offer and must
|
|
80
|
+
* not fall back: it does not exist, so the engine's "explicit path invalid → launch fails loudly"
|
|
81
|
+
* rung fires, and the path itself names why (`…/refused/skills.blocked`).
|
|
82
|
+
*/
|
|
83
|
+
export function refusalPath(root, kind) {
|
|
84
|
+
return join(root, REFUSED_DIRNAME, kind);
|
|
85
|
+
}
|
|
86
|
+
export class SkillsRuntime {
|
|
87
|
+
store;
|
|
88
|
+
log;
|
|
89
|
+
bootSnapshot;
|
|
90
|
+
lastHealth = disabledSkillsHealth();
|
|
91
|
+
constructor(opts) {
|
|
92
|
+
this.store = opts.store;
|
|
93
|
+
this.log = opts.log;
|
|
94
|
+
this.bootSnapshot = 'bootSnapshot' in opts ? opts.bootSnapshot : BOOT_SKILLS_SNAPSHOT;
|
|
95
|
+
}
|
|
96
|
+
/** The seam's last outcome (diagnostics). */
|
|
97
|
+
health() {
|
|
98
|
+
return this.lastHealth;
|
|
99
|
+
}
|
|
100
|
+
/** Boot entry point. Never throws; never fails open (module header). Idempotent: a seeded, published root is only re-verified. */
|
|
101
|
+
async apply() {
|
|
102
|
+
const root = this.store.root;
|
|
103
|
+
let ready;
|
|
104
|
+
try {
|
|
105
|
+
ready = await this.store.ensureReady();
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
109
|
+
this.store.live.exported(null); // no published generation is handed to launches from here on
|
|
110
|
+
if (err instanceof SkillsSourceUnavailableError) {
|
|
111
|
+
applySkillsSnapshotEnv(null, this.bootSnapshot);
|
|
112
|
+
// Say what actually happened to the variable: the boot value is restored EXACTLY — a path,
|
|
113
|
+
// an explicitly EMPTY value, or nothing (deleted). Set-but-empty is a configuration error
|
|
114
|
+
// core refuses (design v3.5 §4): it is preserved, reported as `skills.config`, and never
|
|
115
|
+
// widened into the live-cache fallback rung — only an ABSENT variable reaches that rung.
|
|
116
|
+
const restored = process.env[SKILLS_SNAPSHOT_ENGINE_ENV];
|
|
117
|
+
if (restored === '') {
|
|
118
|
+
const detail = `${SKILLS_SNAPSHOT_ENGINE_ENV} is set but EMPTY — a configuration error core refuses at every launch (export a snapshot path, or unset it to reach the live-plugin fallback); and there is no plugin to publish from: ${message}`;
|
|
119
|
+
this.log(`[skills] skills.config: ${detail}`);
|
|
120
|
+
return this.record({
|
|
121
|
+
state: 'config-error',
|
|
122
|
+
root,
|
|
123
|
+
current: null,
|
|
124
|
+
engineInput: '',
|
|
125
|
+
stateHome: canonicalCrewStateHome(),
|
|
126
|
+
findings: [{ kind: 'skills.config', severity: 'error', message: detail }],
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
this.log(restored === undefined
|
|
130
|
+
? `[skills] skills.fallback: ${message}; ${SKILLS_SNAPSHOT_ENGINE_ENV} left unset (this process booted without one) — the engine resolves the live installed plugin itself`
|
|
131
|
+
: `[skills] skills.fallback: ${message}; ${SKILLS_SNAPSHOT_ENGINE_ENV} restored to the boot value ${restored} (an operator export / harness arming survives the fallback) — the engine reads that path`);
|
|
132
|
+
return this.record({
|
|
133
|
+
state: 'fallback',
|
|
134
|
+
root,
|
|
135
|
+
current: null,
|
|
136
|
+
engineInput: restored ?? null,
|
|
137
|
+
stateHome: canonicalCrewStateHome(),
|
|
138
|
+
findings: [{ kind: 'skills.fallback', severity: 'warning', message }],
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const refusal = refusalPath(root, 'skills.config');
|
|
142
|
+
applySkillsSnapshotEnv(refusal);
|
|
143
|
+
this.log(`[skills] skills.config: skills root ${root} is unusable — ${message}; ${SKILLS_SNAPSHOT_ENGINE_ENV}=${refusal} so every launch fails loudly until it is fixed`);
|
|
144
|
+
return this.record({
|
|
145
|
+
state: 'config-error',
|
|
146
|
+
root,
|
|
147
|
+
current: null,
|
|
148
|
+
engineInput: refusal,
|
|
149
|
+
stateHome: canonicalCrewStateHome(),
|
|
150
|
+
findings: [{ kind: 'skills.config', severity: 'error', message }],
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (ready.seeded)
|
|
154
|
+
this.log(`[skills] seeded ${root} from ${ready.source === null ? 'a source the seed did not record' : describeSeedSource(ready.source)}`);
|
|
155
|
+
if (ready.published !== null && ready.published.verdict === 'blocked') {
|
|
156
|
+
const named = ready.published.findings
|
|
157
|
+
.filter((f) => f.severity === 'blocking')
|
|
158
|
+
.map((f) => `${f.kind}: ${f.evidence}`)
|
|
159
|
+
.join('; ');
|
|
160
|
+
const refusal = refusalPath(root, 'skills.blocked');
|
|
161
|
+
applySkillsSnapshotEnv(refusal);
|
|
162
|
+
this.store.live.exported(null);
|
|
163
|
+
const message = `first publish BLOCKED — no snapshot: ${named}`;
|
|
164
|
+
this.log(`[skills] skills.blocked: ${message}; ${SKILLS_SNAPSHOT_ENGINE_ENV}=${refusal} so every launch fails loudly until the catalog is fixed and published`);
|
|
165
|
+
return this.record({
|
|
166
|
+
state: 'blocked',
|
|
167
|
+
root,
|
|
168
|
+
current: null,
|
|
169
|
+
engineInput: refusal,
|
|
170
|
+
stateHome: canonicalCrewStateHome(),
|
|
171
|
+
findings: [{ kind: 'skills.blocked', severity: 'error', message }],
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (ready.published !== null && ready.published.verdict === 'warnings') {
|
|
175
|
+
// A first publish WITH warnings landed (design v3.4 §1): the snapshot is written and handed
|
|
176
|
+
// over; the warnings are upstream content bugs the operator fixes locally or upstream — say
|
|
177
|
+
// them once, by kind and file:line, so the day-one log is honest about what shipped.
|
|
178
|
+
const named = ready.published.findings.map((f) => `${f.kind}${f.file === null ? '' : ` ${f.file}${f.line === null ? '' : `:${f.line}`}`}`).join('; ');
|
|
179
|
+
this.log(`[skills] first publish landed with ${ready.published.findings.length} warning(s) (published as found; fix in the editor or upstream): ${named}`);
|
|
180
|
+
}
|
|
181
|
+
this.afterPublish();
|
|
182
|
+
return this.lastHealth;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* One CoreEvent from the daemon's event listener: pins the generation the engine reports it
|
|
186
|
+
* handed the live run the event belongs to, releases (and reaps) at the run's terminal frame —
|
|
187
|
+
* live-generations.ts.
|
|
188
|
+
*/
|
|
189
|
+
observe(event) {
|
|
190
|
+
this.store.observeEvent(event);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* One launch notice from the adapter (`CoreAdapter.onLaunch`): the daemon is handing a run or
|
|
194
|
+
* campaign to the engine — open its launch pin at the generation the env exports right now,
|
|
195
|
+
* BEFORE the engine call, so no spawn can read the env ahead of the pin — or the engine refused
|
|
196
|
+
* it (release the pin; nothing will spawn). The pin is otherwise released only by the engine's
|
|
197
|
+
* `skillsSnapshotHanded` report or the terminal frame — never by publish count (codex round 4).
|
|
198
|
+
*/
|
|
199
|
+
launched(notice) {
|
|
200
|
+
if (notice.status === 'handed')
|
|
201
|
+
this.store.live.launched(notice.kind, notice.id);
|
|
202
|
+
else
|
|
203
|
+
this.store.live.launchRejected(notice.kind, notice.id);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Export the VERIFIED current snapshot for the engine — the ONE engine input (v3.4 §2). With
|
|
207
|
+
* nothing published (or an unverifiable `current`) the engine input is NOT touched here — `apply`
|
|
208
|
+
* decided it. Answers the health it recorded, or `null` when there was nothing to export.
|
|
209
|
+
*/
|
|
210
|
+
afterPublish() {
|
|
211
|
+
let current;
|
|
212
|
+
try {
|
|
213
|
+
current = this.store.currentSnapshot();
|
|
214
|
+
}
|
|
215
|
+
catch (err) {
|
|
216
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
217
|
+
const refusal = refusalPath(this.store.root, 'skills.config');
|
|
218
|
+
applySkillsSnapshotEnv(refusal);
|
|
219
|
+
this.store.live.exported(null);
|
|
220
|
+
this.log(`[skills] skills.config: ${message}; ${SKILLS_SNAPSHOT_ENGINE_ENV}=${refusal}`);
|
|
221
|
+
return this.record({
|
|
222
|
+
state: 'config-error',
|
|
223
|
+
root: this.store.root,
|
|
224
|
+
current: null,
|
|
225
|
+
engineInput: refusal,
|
|
226
|
+
stateHome: canonicalCrewStateHome(),
|
|
227
|
+
findings: [{ kind: 'skills.config', severity: 'error', message }],
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
if (current === null) {
|
|
231
|
+
this.store.live.exported(null);
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
applySkillsSnapshotEnv(current.path);
|
|
235
|
+
// Record the generation the env now hands to launches: every launch the adapter announces from
|
|
236
|
+
// here on opens its pin at this generation (and accumulates later publishes) until the engine's
|
|
237
|
+
// `skillsSnapshotHanded` says which one it used or the run ends (live-generations.ts).
|
|
238
|
+
this.store.live.exported(current.gen);
|
|
239
|
+
return this.record({ state: 'published', root: this.store.root, current, engineInput: current.path, stateHome: canonicalCrewStateHome(), findings: [] });
|
|
240
|
+
}
|
|
241
|
+
record(health) {
|
|
242
|
+
this.lastHealth = health;
|
|
243
|
+
return health;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/skills/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAoB,MAAM,YAAY,CAAC;AAE5E;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,MAAoB;IAC9C,MAAM,IAAI,GACR,MAAM,CAAC,IAAI,KAAK,qBAAqB;QACnC,CAAC,CAAC,0DAA0D;QAC5D,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU;YAC1B,CAAC,CAAC,2DAA2D,iBAAiB,4BAA4B;YAC1G,CAAC,CAAC,iDAAiD,iBAAiB,4BAA4B,CAAC;IACvG,OAAO,GAAG,IAAI,OAAO,MAAM,CAAC,IAAI,oBAAoB,MAAM,CAAC,cAAc,iBAAiB,M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