@cogfoundry/loomloom 0.4.5 → 0.4.7
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 +1 -1
- package/bin/installer.cjs +42 -0
- package/bin/loomloom.cjs +3 -0
- package/package.json +7 -7
- package/platforms.json +14 -14
- package/skill/loomloom/references/setup.md +5 -0
- package/skill/loomloom/references/template-spec.md +22 -15
- package/skill-manifest.json +4 -4
package/README.md
CHANGED
|
@@ -12,5 +12,5 @@ GitHub Release assets remain the binary source of truth. The launcher selects an
|
|
|
12
12
|
To install the matching general LoomLoom Skill for one explicit Agent, run:
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npx @cogfoundry/loomloom@0.4.
|
|
15
|
+
npx @cogfoundry/loomloom@0.4.7 install --agent codex --yes
|
|
16
16
|
```
|
package/bin/installer.cjs
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const { spawnSync } = require("node:child_process");
|
|
4
4
|
const fs = require("node:fs");
|
|
5
|
+
const os = require("node:os");
|
|
5
6
|
const path = require("node:path");
|
|
6
7
|
const readline = require("node:readline/promises");
|
|
7
8
|
|
|
8
9
|
const PACKAGE_NAME = "@cogfoundry/loomloom";
|
|
9
10
|
const SKILL_NAME = "loomloom";
|
|
10
11
|
const BUNDLED_SKILL_PATH = path.join(__dirname, "..", "skill", SKILL_NAME);
|
|
12
|
+
const RECEIPT_FILE = "skill-sync.json";
|
|
11
13
|
|
|
12
14
|
function parseInstallArgs(argv) {
|
|
13
15
|
const result = { agent: "", yes: false };
|
|
@@ -43,6 +45,30 @@ function globalPackageSpec(version) {
|
|
|
43
45
|
return `${PACKAGE_NAME}@${version}`;
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
function configDirectory(env = process.env, home = os.homedir()) {
|
|
49
|
+
if (process.platform === "win32") return env.APPDATA || path.join(home, "AppData", "Roaming");
|
|
50
|
+
if (process.platform === "darwin") return path.join(home, "Library", "Application Support");
|
|
51
|
+
return env.XDG_CONFIG_HOME || path.join(home, ".config");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function receiptPath(env = process.env, home = os.homedir()) {
|
|
55
|
+
return path.join(configDirectory(env, home), "loomloom", RECEIPT_FILE);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function loadReceipts(options = {}) {
|
|
59
|
+
try { return JSON.parse(fs.readFileSync(options.path ?? receiptPath(options.env, options.home), "utf8")); } catch { return { version: 1, agents: {} }; }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function saveReceipt(agent, packageVersion, options = {}) {
|
|
63
|
+
const file = options.path ?? receiptPath(options.env, options.home);
|
|
64
|
+
const receipts = loadReceipts({ path: file });
|
|
65
|
+
receipts.version = 1;
|
|
66
|
+
receipts.agents ??= {};
|
|
67
|
+
receipts.agents[agent] = { package: PACKAGE_NAME, package_version: packageVersion, synced_at: new Date().toISOString() };
|
|
68
|
+
fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
69
|
+
fs.writeFileSync(file, `${JSON.stringify(receipts, null, 2)}\n`, { mode: 0o600 });
|
|
70
|
+
}
|
|
71
|
+
|
|
46
72
|
function skillsAddArgs(source, agent) {
|
|
47
73
|
return ["--yes", "skills", "add", source, "--skill", SKILL_NAME, "--global", "--agent", agent, "--yes", "--copy"];
|
|
48
74
|
}
|
|
@@ -114,6 +140,7 @@ async function install(argv, options = {}) {
|
|
|
114
140
|
if (!skillInstalled(listed.stdout)) {
|
|
115
141
|
throw new Error(`skills manager did not report ${SKILL_NAME} for agent ${agent}`);
|
|
116
142
|
}
|
|
143
|
+
saveReceipt(agent, version, options);
|
|
117
144
|
} catch (error) {
|
|
118
145
|
throw new Error(
|
|
119
146
|
`CLI ${version} is installed, but the ${SKILL_NAME} Skill was not installed for ${agent}. ` +
|
|
@@ -126,6 +153,17 @@ async function install(argv, options = {}) {
|
|
|
126
153
|
return { agent, source, version };
|
|
127
154
|
}
|
|
128
155
|
|
|
156
|
+
async function update(argv, options = {}) {
|
|
157
|
+
const parsed = parseInstallArgs(argv);
|
|
158
|
+
const agent = parsed.agent || await (options.promptForAgent ?? promptForAgent)();
|
|
159
|
+
const receipts = loadReceipts(options);
|
|
160
|
+
if (receipts.agents?.[agent]?.package !== PACKAGE_NAME) {
|
|
161
|
+
throw new Error(`no npm-managed LoomLoom Skill receipt for ${agent}; run npx ${PACKAGE_NAME}@latest install --agent ${agent} --yes first`);
|
|
162
|
+
}
|
|
163
|
+
const execute = options.runCommand ?? runCommand;
|
|
164
|
+
execute("npx", ["--yes", `${PACKAGE_NAME}@latest`, "install", "--agent", agent, "--yes"]);
|
|
165
|
+
}
|
|
166
|
+
|
|
129
167
|
module.exports = {
|
|
130
168
|
PACKAGE_NAME,
|
|
131
169
|
SKILL_NAME,
|
|
@@ -133,6 +171,10 @@ module.exports = {
|
|
|
133
171
|
bundledSkillPath,
|
|
134
172
|
globalPackageSpec,
|
|
135
173
|
install,
|
|
174
|
+
update,
|
|
175
|
+
loadReceipts,
|
|
176
|
+
receiptPath,
|
|
177
|
+
saveReceipt,
|
|
136
178
|
parseInstallArgs,
|
|
137
179
|
retryCommand,
|
|
138
180
|
skillInstalled,
|
package/bin/loomloom.cjs
CHANGED
|
@@ -119,6 +119,9 @@ async function run(args = process.argv.slice(2), options = {}) {
|
|
|
119
119
|
if (args[0] === "install") {
|
|
120
120
|
return installer.install(args.slice(1), options);
|
|
121
121
|
}
|
|
122
|
+
if (args[0] === "update") {
|
|
123
|
+
return installer.update(args.slice(1), options);
|
|
124
|
+
}
|
|
122
125
|
const manifest = loadManifest();
|
|
123
126
|
const selected = selectPlatform(manifest);
|
|
124
127
|
const binary = locateBinary(selected);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogfoundry/loomloom",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "LoomLoom CLI for defining, compiling, executing, and managing AI work as software",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"LICENSE"
|
|
23
23
|
],
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@cogfoundry/loomloom-linux-x64": "0.4.
|
|
26
|
-
"@cogfoundry/loomloom-linux-arm64": "0.4.
|
|
27
|
-
"@cogfoundry/loomloom-darwin-x64": "0.4.
|
|
28
|
-
"@cogfoundry/loomloom-darwin-arm64": "0.4.
|
|
29
|
-
"@cogfoundry/loomloom-win32-x64": "0.4.
|
|
30
|
-
"@cogfoundry/loomloom-win32-arm64": "0.4.
|
|
25
|
+
"@cogfoundry/loomloom-linux-x64": "0.4.7",
|
|
26
|
+
"@cogfoundry/loomloom-linux-arm64": "0.4.7",
|
|
27
|
+
"@cogfoundry/loomloom-darwin-x64": "0.4.7",
|
|
28
|
+
"@cogfoundry/loomloom-darwin-arm64": "0.4.7",
|
|
29
|
+
"@cogfoundry/loomloom-win32-x64": "0.4.7",
|
|
30
|
+
"@cogfoundry/loomloom-win32-arm64": "0.4.7"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
package/platforms.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"releaseTag": "v0.4.
|
|
3
|
-
"version": "0.4.
|
|
2
|
+
"releaseTag": "v0.4.7",
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"linux-x64": {
|
|
6
6
|
"package": "@cogfoundry/loomloom-linux-x64",
|
|
7
7
|
"binary": "bin/loomloom",
|
|
8
|
-
"binarySHA256": "
|
|
8
|
+
"binarySHA256": "ad225637dd07fe1b6ead624c4d3f877f997171f7257ec4ce06f3ba5a2228e827",
|
|
9
9
|
"archive": "loomloom-linux-amd64.tar.gz",
|
|
10
|
-
"archiveSHA256": "
|
|
10
|
+
"archiveSHA256": "c894d59350a20c404b00bc6abf50b628db9100c24cd211a5818c3f5c5787f8d8"
|
|
11
11
|
},
|
|
12
12
|
"linux-arm64": {
|
|
13
13
|
"package": "@cogfoundry/loomloom-linux-arm64",
|
|
14
14
|
"binary": "bin/loomloom",
|
|
15
|
-
"binarySHA256": "
|
|
15
|
+
"binarySHA256": "140e6962bc63ae0720b5ab03b4a2fc2e7281689b2b69ee0dd5f13102103f34a3",
|
|
16
16
|
"archive": "loomloom-linux-arm64.tar.gz",
|
|
17
|
-
"archiveSHA256": "
|
|
17
|
+
"archiveSHA256": "199394c66eb4a7741c4f90c81516479226ecb3961f5ac559aa87e9644c49583f"
|
|
18
18
|
},
|
|
19
19
|
"darwin-x64": {
|
|
20
20
|
"package": "@cogfoundry/loomloom-darwin-x64",
|
|
21
21
|
"binary": "bin/loomloom",
|
|
22
|
-
"binarySHA256": "
|
|
22
|
+
"binarySHA256": "84f5efc4eade1804e4035b3c3a7e44f6eac583116dbf8ae614c680d4646cff81",
|
|
23
23
|
"archive": "loomloom-darwin-amd64.tar.gz",
|
|
24
|
-
"archiveSHA256": "
|
|
24
|
+
"archiveSHA256": "a7d70b0c723dcf1f047ba4be63e92c6eb92fa7a8d94afe048462898aafa61769"
|
|
25
25
|
},
|
|
26
26
|
"darwin-arm64": {
|
|
27
27
|
"package": "@cogfoundry/loomloom-darwin-arm64",
|
|
28
28
|
"binary": "bin/loomloom",
|
|
29
|
-
"binarySHA256": "
|
|
29
|
+
"binarySHA256": "1009e2f6cb9bbbbc77b439596258ea2ec191db669ef3b2609053cd41b5d95f41",
|
|
30
30
|
"archive": "loomloom-darwin-arm64.tar.gz",
|
|
31
|
-
"archiveSHA256": "
|
|
31
|
+
"archiveSHA256": "fbd8a0f6342835669f614bc8c06285b6cbf80ed2ec26a2fcab240bc03a01df3e"
|
|
32
32
|
},
|
|
33
33
|
"win32-x64": {
|
|
34
34
|
"package": "@cogfoundry/loomloom-win32-x64",
|
|
35
35
|
"binary": "bin/loomloom.exe",
|
|
36
|
-
"binarySHA256": "
|
|
36
|
+
"binarySHA256": "a1b29b9227f15100be6583253cac32b547792f4d9578873a2e955215d8bd9fc9",
|
|
37
37
|
"archive": "loomloom-windows-amd64.zip",
|
|
38
|
-
"archiveSHA256": "
|
|
38
|
+
"archiveSHA256": "75042b0d981e9a7ed392b2e5f49a5119ae47e953b6c77a4f0234414ef50a4ff4"
|
|
39
39
|
},
|
|
40
40
|
"win32-arm64": {
|
|
41
41
|
"package": "@cogfoundry/loomloom-win32-arm64",
|
|
42
42
|
"binary": "bin/loomloom.exe",
|
|
43
|
-
"binarySHA256": "
|
|
43
|
+
"binarySHA256": "87a19da57a50093b3ed4a208b27f7e8cbc940c3209cad9f93766a3b86e80159c",
|
|
44
44
|
"archive": "loomloom-windows-arm64.zip",
|
|
45
|
-
"archiveSHA256": "
|
|
45
|
+
"archiveSHA256": "ba1764d724c8f3fb67944c2c5fd40415713010864dbe6a92021ec3e64e27ee0f"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -25,6 +25,11 @@ Use this reference for installation, `doctor`, browser login, explicit API Token
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
The npm setup command delegates the selected Agent's Skill root to the `skills` manager, copies the matching official Skill bundled in that npm package, and verifies that the selected Agent reports `loomloom`. In an Agent or non-interactive session, `--agent` is required; never ask the manager to install for every detected Agent.
|
|
28
|
+
- For an Agent previously installed by that npm setup command, update both the npm CLI and its matching copied Skill explicitly:
|
|
29
|
+
```bash
|
|
30
|
+
loomloom update --agent <agent-id>
|
|
31
|
+
```
|
|
32
|
+
It only acts on a recorded npm setup receipt. It must not take over a shell, PowerShell, or Homebrew installation, and it must not guess an Agent directory.
|
|
28
33
|
- For shell or PowerShell installation, determine the current Agent's supported Skill root from its runtime configuration or official conventions. Use `<agent-skill-root>/loomloom` as the complete destination and pass it with `--skill-dir` or `-SkillDir`.
|
|
29
34
|
- `--skill-dir` selects the Agent that receives the Skill; it is not the CLI binary directory. Do not use another Agent's directory as a fallback. In particular, `~/.codex/skills/loomloom` is for Codex only; a WorkBuddy target uses `~/.workbuddy/skills/loomloom`.
|
|
30
35
|
- If the explicit-directory path's current Agent Skill root is unknown, ask the user for it. After installation, verify that `<agent-skill-root>/loomloom/SKILL.md` exists.
|
|
@@ -183,22 +183,29 @@ For a replaceable-model Step:
|
|
|
183
183
|
modalities. Choose a `capabilityProfile` match returned by that exact target
|
|
184
184
|
environment. Do not restrict Profile use to text Steps.
|
|
185
185
|
2. Set `executionBinding.kind=capabilityProfile` and use the response's stable
|
|
186
|
-
`profileId`. Omit `profileRevision`; a dynamic Profile does not accept it
|
|
186
|
+
`profileId`. Omit `profileRevision`; a dynamic Profile does not accept it,
|
|
187
|
+
and normal static-Profile authoring also resolves the current revision.
|
|
187
188
|
Do not require or fabricate a `subjectRevisionId` for a Profile Step.
|
|
188
|
-
3.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Profile
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
`profile_default_model_unavailable`;
|
|
200
|
-
|
|
201
|
-
`
|
|
189
|
+
3. Branch on the returned `dynamic` field before reading Profile-specific
|
|
190
|
+
fields. For `dynamic=true`, build ports from `definition`. For a legacy
|
|
191
|
+
static Profile (`dynamic` absent or false), build ports from the top-level
|
|
192
|
+
`inputPorts` and `output`. Missing `operations` or `defaultModelAvailable`
|
|
193
|
+
on a static Profile is expected and does not mean the Profile is unusable.
|
|
194
|
+
Bind Artifact ports as Artifacts and honor MIME and cardinality constraints.
|
|
195
|
+
Never infer ports from a model name or Provider endpoint.
|
|
196
|
+
4. Keep model choice in the separate `modelSelection` rule. For a dynamic
|
|
197
|
+
Profile, set `defaultModelId` from `operations.defaultModelId` and verify
|
|
198
|
+
both `defaultModelAvailable=true` and membership in `eligibleModels` before
|
|
199
|
+
creation. If the dynamic default is unavailable, stop and report
|
|
200
|
+
`profile_default_model_unavailable`; do not silently choose a replacement.
|
|
201
|
+
5. For a legacy static Profile, choose an explicit `defaultModelId` from its
|
|
202
|
+
non-empty `eligibleModels` according to the user's model policy. Do not
|
|
203
|
+
require `operations.defaultModelId` or `defaultModelAvailable`, and do not
|
|
204
|
+
report `profile_default_model_unavailable` because those fields are absent.
|
|
205
|
+
6. If either Profile kind has no currently eligible models, stop and report
|
|
206
|
+
`profile_has_no_eligible_models`. A blank model cell uses the selected
|
|
207
|
+
default at run time; an explicit value must remain in the current eligible
|
|
208
|
+
set.
|
|
202
209
|
|
|
203
210
|
Text models remain special only in how their capability facts are certified:
|
|
204
211
|
standard text models do not require one `fixedModelContract` or Certification
|
package/skill-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"releaseTag": "v0.4.
|
|
3
|
-
"version": "0.4.
|
|
2
|
+
"releaseTag": "v0.4.7",
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"source": "agent-guidance/loomloom",
|
|
5
5
|
"files": [
|
|
6
6
|
{
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "references/setup.md",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "77b11609fccaf8a6ca80184c04c859d040e093be758634e716e1e712e3471ce3"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"path": "references/template-spec.md",
|
|
32
|
-
"sha256": "
|
|
32
|
+
"sha256": "2c1c1368956e07983c01329568bfee7e19d2586f2f0db00e3b6584b01a9361b6"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "SKILL.md",
|