@clossys/launcher 0.1.1 → 0.1.5
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/CHANGELOG.md +37 -0
- package/README.md +49 -9
- package/dist/check-cli.d.ts.map +1 -1
- package/dist/check-cli.js +9 -1
- package/dist/check-cli.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -6
- package/dist/cli.js.map +1 -1
- package/dist/core.d.ts +28 -5
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +389 -32
- package/dist/core.js.map +1 -1
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +16 -1
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skills.d.ts +20 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +106 -0
- package/dist/skills.js.map +1 -0
- package/dist/types.d.ts +50 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/skeleton/README.md +11 -21
- package/skill-catalogue/advisor/SKILL.md +50 -0
- package/skill-catalogue/architect/SKILL.md +42 -0
- package/skill-catalogue/bouncer/SKILL.md +43 -0
- package/skill-catalogue/builder/SKILL.md +42 -0
- package/skill-catalogue/butler/SKILL.md +43 -0
- package/skill-catalogue/controller/SKILL.md +42 -0
- package/skill-catalogue/designer/SKILL.md +50 -0
- package/skill-catalogue/giver/SKILL.md +43 -0
- package/skill-catalogue/influencer/SKILL.md +43 -0
- package/skill-catalogue/inspector/SKILL.md +42 -0
- package/skill-catalogue/integrator/SKILL.md +42 -0
- package/skill-catalogue/keeper/SKILL.md +43 -0
- package/skill-catalogue/launcher/SKILL.md +53 -0
- package/skill-catalogue/locksmith/SKILL.md +42 -0
- package/skill-catalogue/messenger/SKILL.md +43 -0
- package/skill-catalogue/observer/SKILL.md +42 -0
- package/skill-catalogue/publisher/SKILL.md +50 -0
- package/skill-catalogue/starter/SKILL.md +48 -0
- package/skill-catalogue/strategist/SKILL.md +51 -0
- package/skill-catalogue/writer/SKILL.md +51 -0
- package/src/check-cli.ts +9 -1
- package/src/cli.ts +13 -6
- package/src/core.ts +442 -28
- package/src/host.ts +14 -1
- package/src/index.ts +10 -0
- package/src/skills.ts +120 -0
- package/src/types.ts +50 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ All notable changes to this package are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.5] - 2026-09-20
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Discovery compose skips a `.claude/skills` or `.cursor/skills` path that is already a symlink so it cannot replace composed `SKILL.md`.
|
|
13
|
+
|
|
14
|
+
## [0.1.4] - 2026-09-19
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Hub apply composes the full `clossys-*` skill tree under `.agents/skills/` on create, appoint, and resume, reading bodies from the packed skill catalogue (built at `npm run build` from each package's skill source) or from a sibling checkout. Missing sources are skipped with a health note; apply continues.
|
|
19
|
+
- The same roster is composed into every inventoried repository clone beside the hub (resolved from the generated hub inventory and confirmed with `git remote get-url origin`); the health report lists targets and skipped ids. Sister checkouts get optional canned `AGENTS.md` only when missing or still the generated sister text.
|
|
20
|
+
- Apply writes host discovery links under `.cursor/skills/` and `.claude/skills/` pointing at the composed skills in the hub and each resolved clone.
|
|
21
|
+
- Packed Agent Skill `clossys-launcher` so a coding agent can be invoked as `@clossys-launcher`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Resume refreshes composed skills and replaces stale generated `AGENTS.md` when it still tells founders to use `npx` to continue the conversation; customized `AGENTS.md` files are left alone.
|
|
26
|
+
- Founder-facing hub guidance (`CONSUMER_AGENTS_MD`, skeleton README) now states the same `@clossys-*` team is available in every inventoried checkout; `@clossys-advisor` is the hiring check; `npx @clossys/launcher` refreshes voices on clones beside the hub.
|
|
27
|
+
|
|
28
|
+
## [0.1.2] - 2026-09-19
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Appoint merges `--inventory` into a populated on-disk hub inventory instead of silently discarding the supplied document: repositories are unioned by id (on-disk order first, new ids appended in supplied order, first occurrence of an id wins) and the merged document is written to `.clossys/inventory.json` (that on-disk path does not ship with this package). The both-empty refusal is unchanged.
|
|
33
|
+
- Resume with `--inventory` now refuses with "hub already appointed; edit `.clossys/inventory.json`" (that on-disk path does not ship with this package) instead of the misleading "--inventory is only valid when appointing".
|
|
34
|
+
- Appoint refuses as `violated` when `CLOSSYS_OWNER` names a different account than the repository's github.com origin owner, naming both values; the marker is no longer written for the wrong account.
|
|
35
|
+
- Appoint no longer requires a readable npm registry when the tree already pins `@clossys/advisor` in any dependency bucket (no new version would be needed); the indeterminate refusal only fires when a version is actually required.
|
|
36
|
+
- Appoint refuses as `violated` when `git status --porcelain` is non-empty, before writing anything; when the origin is not on github.com the refusal names the remote host.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- Health report grades each Advisor pin against the live registry version (internal semver compare, no new dependencies): pin older than live is a `stale pin` finding and marks the report degraded; equal pins pass; unparseable comparisons are noted as indeterminate. Exit stays 0 on resume; adopt prints the same report.
|
|
41
|
+
- Pin and extra-`@clossys/*` scans now cover `optionalDependencies` and `peerDependencies` in addition to `dependencies` and `devDependencies`.
|
|
42
|
+
- `checkInventoryEntries()`: read-only validation of hub inventory repository ids through batched `gh repo view --json name`, marking unknown ids in the report and skipping with a note when `gh` is absent. Never mutates the inventory.
|
|
43
|
+
- `launcher-check` forwards `cwd.hub`, so a captured existing-hub observation grades as resume instead of mis-grading as adopt.
|
|
44
|
+
|
|
8
45
|
## [0.1.1] - 2026-09-19
|
|
9
46
|
|
|
10
47
|
### Fixed
|
package/README.md
CHANGED
|
@@ -8,6 +8,21 @@ The hub inventories where Foundry packages are installed and coordinates
|
|
|
8
8
|
engagement. It is not a product application and does not receive a dump of
|
|
9
9
|
the catalogue.
|
|
10
10
|
|
|
11
|
+
## Health report and staleness
|
|
12
|
+
|
|
13
|
+
After create, resume, or appoint — and on every resume — the command prints
|
|
14
|
+
a read-only health report. It scans all four dependency buckets
|
|
15
|
+
(`dependencies`, `devDependencies`, `optionalDependencies`,
|
|
16
|
+
`peerDependencies`) for the Advisor pin and for extra `@clossys/*` names.
|
|
17
|
+
When the live registry version is known, each pin is graded against it: a
|
|
18
|
+
pin older than live is a `stale pin` finding and marks the report
|
|
19
|
+
**degraded**. Exit stays 0 on resume (the report is advisory); adopt prints
|
|
20
|
+
the same report and an unparseable pin-versus-live comparison is noted as
|
|
21
|
+
indeterminate rather than stale. `checkInventoryEntries()` additionally
|
|
22
|
+
validates hub inventory ids read-only, marking ids whose repository no
|
|
23
|
+
longer resolves (skipped with a note when `gh` is unavailable).
|
|
24
|
+
|
|
25
|
+
|
|
11
26
|
## Install
|
|
12
27
|
|
|
13
28
|
The get-started command is the package name:
|
|
@@ -22,9 +37,29 @@ mapping for `@clossys`. Pin an exact version once you depend on the library
|
|
|
22
37
|
API:
|
|
23
38
|
|
|
24
39
|
```bash
|
|
25
|
-
npm install --save-dev --save-exact @clossys/launcher@0.1.
|
|
40
|
+
npm install --save-dev --save-exact @clossys/launcher@0.1.5
|
|
26
41
|
```
|
|
27
42
|
|
|
43
|
+
## Talking to the team
|
|
44
|
+
|
|
45
|
+
First contact is `npx @clossys/launcher` (empty directory or the checkout you
|
|
46
|
+
appoint as the hub). After apply, the launcher composes the same
|
|
47
|
+
`@clossys-<package>` voices into the hub and into every inventoried repository
|
|
48
|
+
checkout that already sits beside the hub (`.agents/skills/clossys-<package>/`
|
|
49
|
+
plus host discovery links). Composition is per checkout, not machine-wide, and
|
|
50
|
+
is not a catalogue dump into `package.json`.
|
|
51
|
+
|
|
52
|
+
Voices are how you talk in a coding agent; they are not engagement engines. The
|
|
53
|
+
`@clossys/advisor` npm package is the engine that grades evidence;
|
|
54
|
+
`@clossys-advisor` in chat is its hiring and compatibility voice. Use
|
|
55
|
+
`@clossys-advisor` and `@clossys-<package>` in the hub or in any inventoried
|
|
56
|
+
product repository. Each voice can talk even when that npm package is not pinned
|
|
57
|
+
in that repo. Launcher health notes missing catalogue sources but apply continues.
|
|
58
|
+
|
|
59
|
+
Run `npx @clossys/launcher` again from the hub for a health report and to
|
|
60
|
+
refresh composed voices on sibling inventoried clones. It does not
|
|
61
|
+
`gh repo clone` missing inventory entries—that is not how you talk to the team.
|
|
62
|
+
|
|
28
63
|
## How to run it
|
|
29
64
|
|
|
30
65
|
There is no `--org` flag. Owner is inferred from authenticated `gh` and from
|
|
@@ -38,8 +73,8 @@ silent fallback.
|
|
|
38
73
|
| Current directory | What happens |
|
|
39
74
|
| --- | --- |
|
|
40
75
|
| Empty | Creates `{owner}/workspace` from the in-package skeleton, or clones that hub if it already exists. |
|
|
41
|
-
| Already a hub (generated marker; packed template `skeleton/.clossys/workspace.json`) | Resumes. No new repository. |
|
|
42
|
-
| Any other GitHub repository you control | Appoints it as the account hub. Keeps the existing name and files. Writes the hub marker. Leaves an existing `@clossys/advisor` pin in whichever bucket it already occupies; pins live Advisor in `devDependencies` only when missing. Refuses if the generated hub inventory is missing or empty (packed template `skeleton/.clossys/inventory.json`; that generated path does not ship) unless `--inventory <path>` supplies a populated document. Does not rewrite the lockfile or dump the catalogue. Prints a read-only health report. |
|
|
76
|
+
| Already a hub (generated marker; packed template `skeleton/.clossys/workspace.json`) | Resumes. No new repository. `--inventory` here is refused with a pointer to the appointed hub's own `.clossys/inventory.json`. |
|
|
77
|
+
| Any other GitHub repository you control | Appoints it as the account hub. Keeps the existing name and files. Refuses when the working tree has uncommitted changes (`git status --porcelain` non-empty) — the refusal names the offending remote host when the origin is not on github.com. Refuses when `CLOSSYS_OWNER` names a different account than the repository's github.com origin owner. Writes the hub marker. Leaves an existing `@clossys/advisor` pin in whichever bucket it already occupies; pins live Advisor in `devDependencies` only when missing. Refuses if the generated hub inventory is missing or empty (packed template `skeleton/.clossys/inventory.json`; that generated path does not ship) unless `--inventory <path>` supplies a populated document — or, when the on-disk inventory is already populated and `--inventory` is also supplied, merges the two by repository id (on-disk order first, new ids appended, first occurrence of an id wins). Does not rewrite the lockfile or dump the catalogue. Prints a read-only health report. |
|
|
43
78
|
|
|
44
79
|
It does not have to be a brand-new exclusive repository, and it does not
|
|
45
80
|
have to already match a Foundry layout. Informal "workspace-looking" trees
|
|
@@ -68,7 +103,7 @@ Exit codes preserve the ternary:
|
|
|
68
103
|
| Exit | State | Meaning |
|
|
69
104
|
| --- | --- | --- |
|
|
70
105
|
| `0` | `satisfied` | Created, resumed, or appointed the hub. The message includes a read-only health report. |
|
|
71
|
-
| `1` | `violated` | Known refusal: not GitHub, not empty, missing appoint inventory, or the
|
|
106
|
+
| `1` | `violated` | Known refusal: not GitHub, not empty, missing appoint inventory, the supplier tree, uncommitted changes in the appoint tree, or a `CLOSSYS_OWNER` that disagrees with the origin owner. |
|
|
72
107
|
| `2` | `indeterminate` | Missing `gh`, unreadable registry pin, or an owner that could not be inferred. |
|
|
73
108
|
|
|
74
109
|
`launcher-check` grades a captured observation JSON through `planWorkspace` and does not create a hub. Same ternary: 0 is a create/resume/adopt plan, 1 is a known refusal, 2 could not run or could not decide. Appoint grades as a plan only when the observation already records a populated inventory; `--inventory` is a live CLI flag, not a check-cli input.
|
|
@@ -78,24 +113,29 @@ Exit codes preserve the ternary:
|
|
|
78
113
|
| Export | Description |
|
|
79
114
|
| --- | --- |
|
|
80
115
|
| `planWorkspace()` | Decides create, resume, or adopt from a cwd observation. Optional `{ inventoryPath }` is the only way to appoint without a populated on-disk inventory. |
|
|
81
|
-
| `applyWorkspacePlan()` | Copies the in-package skeleton or hub marker through a host port and returns a `WorkspaceApplyResult` with health.
|
|
116
|
+
| `applyWorkspacePlan()` | Copies the in-package skeleton or hub marker through a host port and returns a `WorkspaceApplyResult` with health. Composes the same skill voices on the hub and on inventoried sibling checkouts beside it; refreshes stale hub guidance on every path, including resume. Optional `{ skillCatalogueRoot, launcherPackageRoot }` selects where skill bodies are read. |
|
|
82
117
|
| `observeWorkspace()` | Reads `gh`, git remotes, cwd, inventory classification, and the public Advisor version. |
|
|
118
|
+
| `readInventoryRepositories()` | Reads repository ids from a `schemaVersion: 1` inventory document. |
|
|
119
|
+
| `launcherPackageRootFromModule()` | Resolves this package's root from `import.meta.url` so apply can find the packed skill catalogue. |
|
|
83
120
|
| `parseGitHubRemote()` | Parses a github.com remote and rejects any other host. |
|
|
84
121
|
| `isHubDocument()` | Type guard for the generated hub marker (packed template: `skeleton/.clossys/workspace.json`). |
|
|
85
122
|
| `inspectInventory()` | Classifies inventory JSON as missing, empty, or populated. |
|
|
86
123
|
| `reportHubHealth()` | Read-only pin and inventory report. Does not install or uninstall. |
|
|
87
124
|
| `formatHubHealth()` | Human lines plus a `health:` JSON line for the same report. |
|
|
125
|
+
| `hasAdvisorPin()` | True when a manifest already pins Advisor in any dependency bucket. |
|
|
126
|
+
| `checkInventoryEntries()` | Read-only inventory id validation through `gh repo view` (batched; skips with a note when `gh` is unavailable). |
|
|
88
127
|
| `DEFAULT_REPOSITORY_NAME` | Default new-hub repository name (`workspace`). Used only when creating, never when appointing. |
|
|
89
128
|
| `WORKSPACE_MARKER_REL` | Relative path of the hub marker. |
|
|
90
129
|
| `WORKSPACE_INVENTORY_REL` | Relative path of the hub inventory. |
|
|
91
|
-
| `CommandResult` / `CwdObservation` / `HubDocument` / `HubHealthReport` / `InventoryObservation` / `WorkspaceApplyResult` / `WorkspaceDecision` / `WorkspaceHost` / `WorkspaceObservation` / `WorkspacePlan` / `WorkspaceRefusal` / `WorkspaceState` | Typed host, observation, plan, health, and outcome contracts. |
|
|
130
|
+
| `CommandResult` / `CwdObservation` / `DependencyBucket` / `HubDocument` / `HubHealthReport` / `InventoryObservation` / `InventoryValidationEntry` / `InventoryValidationReport` / `PinFinding` / `PinGrade` / `ApplyWorkspaceOptions` / `WorkspaceApplyResult` / `WorkspaceDecision` / `WorkspaceHost` / `WorkspaceObservation` / `WorkspacePlan` / `WorkspaceRefusal` / `WorkspaceState` | Typed host, observation, plan, health, and outcome contracts. |
|
|
92
131
|
|
|
93
132
|
## Why this is not Advisor, Starter, Builder, installer, creator, or a connector
|
|
94
133
|
|
|
95
134
|
Advisor is the engagement engine: it grades evidence and names a next
|
|
96
|
-
action. It has no GitHub I/O, and must not grow any.
|
|
97
|
-
|
|
98
|
-
|
|
135
|
+
action. It has no GitHub I/O, and must not grow any. The composed
|
|
136
|
+
`@clossys-advisor` voice is hiring and compatibility in chat, not a second
|
|
137
|
+
engine. A remote chat connector is a separately deployed product surface for
|
|
138
|
+
that engine, not a repo scaffolder.
|
|
99
139
|
|
|
100
140
|
Starter (`@clossys/starter`) is the protected-base **activation** gate.
|
|
101
141
|
Its only v1 subcommand is `decide`. It joins a pull-request snapshot to
|
package/dist/check-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-cli.d.ts","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAIV,aAAa,EACb,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,WAAW,uSAM0B,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;
|
|
1
|
+
{"version":3,"file":"check-cli.d.ts","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAIV,aAAa,EACb,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,WAAW,uSAM0B,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AAqDrD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAsBrE;AAMD,uEAAuE;AACvE,wBAAgB,YAAY,IAAI,aAAa,CAuB5C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAK7F;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC/B,MAAM,CA4BR"}
|
package/dist/check-cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { isDirectInvocation } from "./cli.js";
|
|
5
|
-
import { planWorkspace } from "./core.js";
|
|
5
|
+
import { isHubDocument, planWorkspace } from "./core.js";
|
|
6
6
|
export const CHECK_USAGE = `Usage: launcher-check --input <observation.json>
|
|
7
7
|
|
|
8
8
|
Grade a captured workspace observation through planWorkspace. This bin does
|
|
@@ -45,6 +45,9 @@ function parseCwd(value) {
|
|
|
45
45
|
if (value.githubRepository !== undefined && !isText(value.githubRepository)) {
|
|
46
46
|
throw new LauncherCheckInputError("observation.cwd.githubRepository must be a string");
|
|
47
47
|
}
|
|
48
|
+
if (value.hub !== undefined && !isHubDocument(value.hub)) {
|
|
49
|
+
throw new LauncherCheckInputError("observation.cwd.hub must be a v1 account-hub marker (schemaVersion, kind, owner, repository)");
|
|
50
|
+
}
|
|
48
51
|
const inventory = parseInventoryObservation(value.inventory);
|
|
49
52
|
return {
|
|
50
53
|
absolutePath: value.absolutePath,
|
|
@@ -53,6 +56,7 @@ function parseCwd(value) {
|
|
|
53
56
|
looksLikeFoundry: value.looksLikeFoundry,
|
|
54
57
|
...(isText(value.githubOwner) ? { githubOwner: value.githubOwner } : {}),
|
|
55
58
|
...(isText(value.githubRepository) ? { githubRepository: value.githubRepository } : {}),
|
|
59
|
+
...(isHubDocument(value.hub) ? { hub: value.hub } : {}),
|
|
56
60
|
...(inventory === undefined ? {} : { inventory }),
|
|
57
61
|
};
|
|
58
62
|
}
|
|
@@ -92,6 +96,7 @@ export function planningHost() {
|
|
|
92
96
|
now: () => "1970-01-01T00:00:00.000Z",
|
|
93
97
|
exists: () => false,
|
|
94
98
|
isDirectory: () => false,
|
|
99
|
+
isSymlink: () => false,
|
|
95
100
|
readText: () => null,
|
|
96
101
|
writeText: () => {
|
|
97
102
|
throw new Error("launcher-check does not write");
|
|
@@ -99,6 +104,9 @@ export function planningHost() {
|
|
|
99
104
|
mkdirp: () => {
|
|
100
105
|
throw new Error("launcher-check does not write");
|
|
101
106
|
},
|
|
107
|
+
symlink: () => {
|
|
108
|
+
throw new Error("launcher-check does not write");
|
|
109
|
+
},
|
|
102
110
|
readDir: () => [],
|
|
103
111
|
run: () => unused(),
|
|
104
112
|
prompt: () => null,
|
package/dist/check-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-cli.js","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"check-cli.js","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C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AAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EACpC,CAAC,IAAI,EAAE,EAAE;YACP,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;YACP,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import type { WorkspaceHost } from "./types.js";
|
|
3
|
-
export declare const USAGE = "Usage: launcher [--inventory <path>]\n\nCreate, resume, or appoint a GitHub repository as the account workspace hub.\n\nRun from an empty directory to create {owner}/workspace. Run from an existing\nhub to resume. Run from any GitHub repository you want to own the account-level\nhub to appoint it \u2014 it does not have to be a new exclusive repo, and it keeps\nits current name and files.\n\nAppointing requires a populated generated hub inventory (packed template\nskeleton/.clossys/inventory.json; the generated path does not ship), or\n--inventory <path> pointing at one. Resume
|
|
3
|
+
export declare const USAGE = "Usage: launcher [--inventory <path>]\n\nCreate, resume, or appoint a GitHub repository as the account workspace hub.\n\nRun from an empty directory to create {owner}/workspace. Run from an existing\nhub to resume. Run from any GitHub repository you want to own the account-level\nhub to appoint it \u2014 it does not have to be a new exclusive repo, and it keeps\nits current name and files.\n\nAppointing requires a populated generated hub inventory (packed template\nskeleton/.clossys/inventory.json; the generated path does not ship), or\n--inventory <path> pointing at one. Resume refreshes composed skills and\nstale hub guidance. Create may write an empty inventory.\n\nGitHub-only. Owner is inferred from `gh` and git remotes. Public npm reads\nneed no token.\n\nExit codes: 0 = satisfied, 1 = a known refusal, 2 = indeterminate.";
|
|
4
4
|
export declare class LauncherInputError extends Error {
|
|
5
5
|
}
|
|
6
6
|
export declare function parseLauncherArgs(argv: readonly string[]): {
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,KAAK,y0BAiBiD,CAAC;AAEpE,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAMhD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAKpG;AAED,4FAA4F;AAC5F,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAkC/F;AAaD,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAO3F"}
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { realpathSync } from "node:fs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { applyWorkspacePlan, observeWorkspace, planWorkspace, skeletonRootFromModule } from "./core.js";
|
|
5
|
+
import { applyWorkspacePlan, observeWorkspace, planWorkspace, launcherPackageRootFromModule, skeletonRootFromModule } from "./core.js";
|
|
6
6
|
import { createNodeHost } from "./host.js";
|
|
7
7
|
export const USAGE = `Usage: launcher [--inventory <path>]
|
|
8
8
|
|
|
@@ -15,8 +15,8 @@ its current name and files.
|
|
|
15
15
|
|
|
16
16
|
Appointing requires a populated generated hub inventory (packed template
|
|
17
17
|
skeleton/.clossys/inventory.json; the generated path does not ship), or
|
|
18
|
-
--inventory <path> pointing at one. Resume
|
|
19
|
-
an empty inventory.
|
|
18
|
+
--inventory <path> pointing at one. Resume refreshes composed skills and
|
|
19
|
+
stale hub guidance. Create may write an empty inventory.
|
|
20
20
|
|
|
21
21
|
GitHub-only. Owner is inferred from \`gh\` and git remotes. Public npm reads
|
|
22
22
|
need no token.
|
|
@@ -57,17 +57,25 @@ export function main(argv, host, skeletonRoot) {
|
|
|
57
57
|
return exitCodeFor(decision.state);
|
|
58
58
|
}
|
|
59
59
|
if (parsed.inventoryPath !== undefined && decision.action !== "adopt") {
|
|
60
|
-
|
|
60
|
+
if (decision.action === "resume") {
|
|
61
|
+
console.error("launcher: this hub is already appointed; edit .clossys/inventory.json to change its inventory");
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
console.error("launcher: --inventory is only valid when appointing a GitHub repository");
|
|
65
|
+
}
|
|
61
66
|
return 1;
|
|
62
67
|
}
|
|
63
|
-
const result = applyWorkspacePlan(host, decision, skeletonRoot
|
|
68
|
+
const result = applyWorkspacePlan(host, decision, skeletonRoot, {
|
|
69
|
+
launcherPackageRoot: launcherPackageRootFromModule(import.meta.url),
|
|
70
|
+
});
|
|
64
71
|
console.log(result.message);
|
|
65
72
|
return 0;
|
|
66
73
|
}
|
|
67
74
|
function run() {
|
|
68
75
|
try {
|
|
69
76
|
const host = createNodeHost();
|
|
70
|
-
|
|
77
|
+
const moduleUrl = import.meta.url;
|
|
78
|
+
process.exitCode = main(process.argv.slice(2), host, skeletonRootFromModule(moduleUrl));
|
|
71
79
|
}
|
|
72
80
|
catch (cause) {
|
|
73
81
|
console.error(`launcher: ${cause instanceof Error ? cause.message : String(cause)}`);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACvI,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;mEAiB8C,CAAC;AAEpE,MAAM,OAAO,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,SAAS,WAAW,CAAC,KAAiD;IACpE,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAuB;IACvD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CA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AC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,kBAAkB,CAAC,SAAiB,EAAE,QAA4B;IAChF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAAE,GAAG,EAAE,CAAC"}
|
package/dist/core.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { HubDocument, HubHealthReport, InventoryObservation, WorkspaceApplyResult, WorkspaceDecision, WorkspaceHost, WorkspaceObservation, WorkspacePlan } from "./types.js";
|
|
1
|
+
import type { ApplyWorkspaceOptions, HubDocument, HubHealthReport, InventoryObservation, InventoryValidationReport, WorkspaceApplyResult, WorkspaceDecision, WorkspaceHost, WorkspaceObservation, WorkspacePlan } from "./types.js";
|
|
2
2
|
export declare const DEFAULT_REPOSITORY_NAME = "workspace";
|
|
3
3
|
export declare const WORKSPACE_MARKER_REL = ".clossys/workspace.json";
|
|
4
4
|
export declare const WORKSPACE_INVENTORY_REL = ".clossys/inventory.json";
|
|
5
5
|
export declare const ADVISOR_PACKAGE = "@clossys/advisor";
|
|
6
6
|
/** Written at generate time so this package never ships a nested AGENTS.md. */
|
|
7
|
-
export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis
|
|
7
|
+
export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis folder is the account hub for Foundry packages.\n\nAfter `npx @clossys/launcher`, the same `@clossys-*` team is composed in\nevery inventoried checkout beside this hub. Talk with `@clossys-advisor` and\n`@clossys-<package>` here or in a product repository. A missing `@` mention\nis not how we signal incompatibility \u2014 `@clossys-advisor` is the hiring check.\n\nRun `npx @clossys/launcher` again for hub health and to refresh voices on\nclones next to the hub, not as how you talk to packages.\n\nAdvisor is read-only until the sponsor approves a next action.\n";
|
|
8
|
+
/** Canned guidance for inventoried product checkouts (not the hub). */
|
|
9
|
+
export declare const SISTER_CONSUMER_AGENTS_MD = "# Product repository\n\nThis repository is part of the same account engagement. The same\n`@clossys-<package>` team is here for intro and questions;\n`@clossys-advisor` decides hiring and compatibility. This folder is not the\nhub \u2014 engines are hired per repository, not dumped here.\n";
|
|
10
|
+
/** Previous generate-time guidance; used to refresh stale hub AGENTS.md on resume. */
|
|
11
|
+
export declare const LEGACY_CONSUMER_AGENTS_MD = "# Account workspace\n\nThis repository is the account hub for Foundry packages. It inventories\nwhere packages are installed and coordinates engagement. It is not a\nproduct application and does not need the whole catalogue installed here.\n\nOpen this folder in your coding agent. Advisor is read-only until you\napprove a next action.\n\nRun `npx @clossys/launcher` again to resume. Public npm reads\nneed no token.\n";
|
|
8
12
|
export declare const CONSUMER_CLAUDE_MD = "@AGENTS.md\n";
|
|
9
13
|
/** Parses a GitHub git remote. Any other host is rejected. */
|
|
10
14
|
export declare function parseGitHubRemote(url: string): {
|
|
@@ -15,15 +19,34 @@ export declare function parseGitHubRemote(url: string): {
|
|
|
15
19
|
export declare function isHubDocument(value: unknown): value is HubDocument;
|
|
16
20
|
/** Classifies a generated hub inventory (packed template skeleton/.clossys/inventory.json; the generated path does not ship) without inventing repositories. */
|
|
17
21
|
export declare function inspectInventory(raw: string | null): InventoryObservation;
|
|
22
|
+
/** True when the tree already pins Advisor in some bucket, so adopt would not need a new version. */
|
|
23
|
+
export declare function hasAdvisorPin(manifest: unknown): boolean;
|
|
18
24
|
/** Collects GitHub owner, cwd shape, default-hub presence, and the public Advisor pin. */
|
|
19
25
|
export declare function observeWorkspace(host: WorkspaceHost): WorkspaceObservation;
|
|
26
|
+
/**
|
|
27
|
+
* Decides create, resume, or adopt from a cwd observation.
|
|
28
|
+
* Appointing means: run this from the GitHub repository that should own the hub.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readInventoryRepositories(host: WorkspaceHost, source: string, label: string): readonly string[];
|
|
20
31
|
export declare function planWorkspace(observation: WorkspaceObservation, host: WorkspaceHost, options?: {
|
|
21
32
|
inventoryPath?: string;
|
|
22
33
|
}): WorkspaceDecision;
|
|
23
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Read-only pin and inventory report. Does not install or uninstall. Scans all
|
|
36
|
+
* four dependency buckets; grades each pinned advisor version against the live
|
|
37
|
+
* registry version, marking a pin older than live as a stale-pin finding and a
|
|
38
|
+
* degraded report.
|
|
39
|
+
*/
|
|
24
40
|
export declare function reportHubHealth(host: WorkspaceHost, directory: string, liveAdvisorVersion?: string): HubHealthReport;
|
|
25
41
|
export declare function formatHubHealth(report: HubHealthReport): string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Read-only inventory validation: runs `gh repo view --json name` for each
|
|
44
|
+
* repository id, batched. Tolerates a missing or failing `gh` by skipping with
|
|
45
|
+
* a note; marks ids whose check fails as unknown. Never mutates the inventory.
|
|
46
|
+
*/
|
|
47
|
+
export declare function checkInventoryEntries(host: WorkspaceHost, directory: string): InventoryValidationReport;
|
|
48
|
+
/** Applies a create, resume, or adopt plan through the host. Resume refreshes composed skills and stale AGENTS.md guidance. */
|
|
49
|
+
export declare function applyWorkspacePlan(host: WorkspaceHost, plan: WorkspacePlan, skeletonRoot: string, options?: ApplyWorkspaceOptions): WorkspaceApplyResult;
|
|
50
|
+
export declare function launcherPackageRootFromModule(moduleUrl: string): string;
|
|
28
51
|
export declare function skeletonRootFromModule(moduleUrl: string): string;
|
|
29
52
|
//# sourceMappingURL=core.d.ts.map
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EAIrB,WAAW,EACX,eAAe,EACf,oBAAoB,EAEpB,yBAAyB,EAEzB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,aAAa,EAGd,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,uBAAuB,cAAc,CAAC;AACnD,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAmBlD,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,ulBAa9B,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,yBAAyB,uSAMrC,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,waAWrC,CAAC;AAEF,eAAO,MAAM,kBAAkB,iBAC9B,CAAC;AAoBF,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAqB3F;AA8BD,yDAAyD;AACzD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CASlE;AAaD,gKAAgK;AAChK,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,oBAAoB,CAYzE;AAkCD,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAGxD;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,oBAAoB,CAiE1E;AAqBD;;;GAGG;AACH,wBAAgB,yBAAyB,CAA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