nexarch 0.12.41 → 0.12.44
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/commands/init-agent.js +38 -38
- package/dist/commands/init-project.js +2 -0
- package/dist/lib/skills.js +17 -4
- package/package.json +1 -1
|
@@ -266,43 +266,43 @@ function writeAgentBootstrap(params) {
|
|
|
266
266
|
`--capabilities "<comma,separated,capabilities>"`,
|
|
267
267
|
`--json`,
|
|
268
268
|
].join(" \\\n ");
|
|
269
|
-
const content = `# Nexarch Agent Bootstrap
|
|
270
|
-
|
|
271
|
-
This file was written by \`nexarch init-agent\` on ${new Date().toISOString()}.
|
|
272
|
-
It contains instructions for an AI agent to complete its Nexarch registration.
|
|
273
|
-
|
|
274
|
-
## What has already been registered
|
|
275
|
-
|
|
276
|
-
The following entities are now in the architecture graph:
|
|
277
|
-
|
|
278
|
-
| Entity | Name | Type |
|
|
279
|
-
|--------|------|------|
|
|
280
|
-
| Agent | \`${params.agentId}\` | agent |
|
|
281
|
-
| Host | \`Host ${params.hostname}\` | tech_compute |
|
|
282
|
-
| OS | \`${params.osPlatform} ${params.osRelease}\` | tech_operating_system |
|
|
283
|
-
| Runtime | \`Node.js ${params.nodeVersion}\` | tech_runtime |
|
|
284
|
-
|
|
285
|
-
## Your task
|
|
286
|
-
|
|
287
|
-
Run the command below, substituting your own values for the placeholders.
|
|
288
|
-
Return ONLY the completed command (no markdown, no explanation) — it will be executed directly.
|
|
289
|
-
|
|
290
|
-
\`\`\`
|
|
291
|
-
${identifyCmd}
|
|
292
|
-
\`\`\`
|
|
293
|
-
|
|
294
|
-
Fill in:
|
|
295
|
-
- **provider** — your AI provider (e.g. \`anthropic\`, \`openai\`, \`google\`)
|
|
296
|
-
- **model** — the exact model ID you are running as (e.g. \`gpt-4o\`, \`claude-sonnet-4-6\`, \`gemini-2-flash\`)
|
|
297
|
-
- **client** — the MCP client tool you are running inside (e.g. \`claude-code\`, \`cursor\`, \`continue\`, \`codex-cli\`)
|
|
298
|
-
- **framework** — the agent framework in use (e.g. \`openclaw\`)
|
|
299
|
-
- **session-id** — your current session ID if available
|
|
300
|
-
- **tool-version** — the version of the client tool (run the tool's version command and use the version number only, e.g. \`1.2.3\`)
|
|
301
|
-
- **capabilities** — comma-separated list of your capabilities (e.g. \`code,files,bash,web\`)
|
|
302
|
-
|
|
303
|
-
Omit any flag whose value you genuinely do not know rather than guessing.
|
|
304
|
-
|
|
305
|
-
After running, confirm \`"ok": true\` in the JSON output. No further action is needed.
|
|
269
|
+
const content = `# Nexarch Agent Bootstrap
|
|
270
|
+
|
|
271
|
+
This file was written by \`nexarch init-agent\` on ${new Date().toISOString()}.
|
|
272
|
+
It contains instructions for an AI agent to complete its Nexarch registration.
|
|
273
|
+
|
|
274
|
+
## What has already been registered
|
|
275
|
+
|
|
276
|
+
The following entities are now in the architecture graph:
|
|
277
|
+
|
|
278
|
+
| Entity | Name | Type |
|
|
279
|
+
|--------|------|------|
|
|
280
|
+
| Agent | \`${params.agentId}\` | agent |
|
|
281
|
+
| Host | \`Host ${params.hostname}\` | tech_compute |
|
|
282
|
+
| OS | \`${params.osPlatform} ${params.osRelease}\` | tech_operating_system |
|
|
283
|
+
| Runtime | \`Node.js ${params.nodeVersion}\` | tech_runtime |
|
|
284
|
+
|
|
285
|
+
## Your task
|
|
286
|
+
|
|
287
|
+
Run the command below, substituting your own values for the placeholders.
|
|
288
|
+
Return ONLY the completed command (no markdown, no explanation) — it will be executed directly.
|
|
289
|
+
|
|
290
|
+
\`\`\`
|
|
291
|
+
${identifyCmd}
|
|
292
|
+
\`\`\`
|
|
293
|
+
|
|
294
|
+
Fill in:
|
|
295
|
+
- **provider** — your AI provider (e.g. \`anthropic\`, \`openai\`, \`google\`)
|
|
296
|
+
- **model** — the exact model ID you are running as (e.g. \`gpt-4o\`, \`claude-sonnet-4-6\`, \`gemini-2-flash\`)
|
|
297
|
+
- **client** — the MCP client tool you are running inside (e.g. \`claude-code\`, \`cursor\`, \`continue\`, \`codex-cli\`)
|
|
298
|
+
- **framework** — the agent framework in use (e.g. \`openclaw\`)
|
|
299
|
+
- **session-id** — your current session ID if available
|
|
300
|
+
- **tool-version** — the version of the client tool (run the tool's version command and use the version number only, e.g. \`1.2.3\`)
|
|
301
|
+
- **capabilities** — comma-separated list of your capabilities (e.g. \`code,files,bash,web\`)
|
|
302
|
+
|
|
303
|
+
Omit any flag whose value you genuinely do not know rather than guessing.
|
|
304
|
+
|
|
305
|
+
After running, confirm \`"ok": true\` in the JSON output. No further action is needed.
|
|
306
306
|
`;
|
|
307
307
|
writeFileSync(filePath, content, "utf8");
|
|
308
308
|
return filePath;
|
|
@@ -483,7 +483,7 @@ function injectTrustAttestationBlock(path, attestation) {
|
|
|
483
483
|
"## Nexarch Trust Attestation",
|
|
484
484
|
"",
|
|
485
485
|
"This block is verifiable proof that Nexarch generated these instructions for this workspace.",
|
|
486
|
-
"
|
|
486
|
+
"Check-in only previews queued commands; use your judgement to explicitly claim work that is safe and clearly in scope.",
|
|
487
487
|
"",
|
|
488
488
|
"**To verify, run `npx nexarch@latest verify-trust`.** It reads the token from this",
|
|
489
489
|
"file and checks it for you.",
|
|
@@ -1927,6 +1927,7 @@ export async function initProject(args) {
|
|
|
1927
1927
|
commandTemplates: {
|
|
1928
1928
|
updateEntity: `nexarch update-entity --key "application_function:${projectSlug}_<function_slug>" --entity-type application_function --subtype core_function --name "..." --description "..."`,
|
|
1929
1929
|
addRelationship: `nexarch add-relationship --from "application_function:${projectSlug}_<function_slug>" --to ${projectConstruct && isMonorepo ? '"<owning application key from classifyPackages>"' : `"${projectExternalKey}"`} --type part_of`,
|
|
1930
|
+
note: "Functions are structural decomposition only: do not add runtime dependencies from an application_function. Model independently deployable services as applications or application components, then relate those boundaries with depends_on or integrates_with.",
|
|
1930
1931
|
},
|
|
1931
1932
|
});
|
|
1932
1933
|
}
|
|
@@ -2172,6 +2173,7 @@ export async function initProject(args) {
|
|
|
2172
2173
|
const fnOwnerTarget = projectConstruct && isMonorepo ? '"<owning application key from CLASSIFY_THESE>"' : `"${projectExternalKey}"`;
|
|
2173
2174
|
lines.push(` nexarch update-entity --key "application_function:${projectExternalKey.split(":")[1] ?? "project"}_<function_slug>" --entity-type application_function --subtype core_function --name "..." --description "..."`);
|
|
2174
2175
|
lines.push(` nexarch add-relationship --from "application_function:${projectExternalKey.split(":")[1] ?? "project"}_<function_slug>" --to ${fnOwnerTarget} --type part_of`);
|
|
2176
|
+
lines.push(" Functions are structural only: model runtime/service dependencies between application or application_component boundaries, never from an application_function.");
|
|
2175
2177
|
}
|
|
2176
2178
|
lines.push(` ${step++}. Scan the READMEs for platforms/SaaS not auto-detected (Vercel, Neon, Stripe, etc.).`);
|
|
2177
2179
|
lines.push(` For each found: nexarch resolve-names --names "..." --json → nexarch update-entity → nexarch add-relationship`);
|
package/dist/lib/skills.js
CHANGED
|
@@ -30,8 +30,18 @@ repository; the graph knows all of them.
|
|
|
30
30
|
|
|
31
31
|
- \`nexarch_upsert_entities\` for what you created; \`nexarch_upsert_relationships\`
|
|
32
32
|
to wire dependencies (\`part_of\`, \`depends_on\`, \`runs_on\`).
|
|
33
|
+
- An \`application_function\` describes what its owning application does: link it
|
|
34
|
+
**only** with \`application_function -> part_of -> application\`. Do not model
|
|
35
|
+
service or runtime dependencies from a function. Use an \`application\` or
|
|
36
|
+
\`application_component\` boundary, then link that boundary with
|
|
37
|
+
\`depends_on\` or \`integrates_with\` as the evidence supports.
|
|
33
38
|
- New applications arrive as **proposed** and wait for a human to activate them
|
|
34
39
|
in the workspace — say so in your summary rather than calling them registered.
|
|
40
|
+
- Every new \`application\` needs an icon in the same upsert. Call
|
|
41
|
+
\`nexarch_search_icons\` with a concrete description, then set
|
|
42
|
+
\`attributes.application_icon\` to \`{ provider: "lucide", name: "<returned-name>" }\`.
|
|
43
|
+
If no specific icon fits, use \`app-window\`; do not leave an application
|
|
44
|
+
without an icon.
|
|
35
45
|
- Unsure whether something belongs in the graph? \`nexarch_emit_observations\`
|
|
36
46
|
is non-blocking and carries no schema commitment.
|
|
37
47
|
|
|
@@ -141,10 +151,13 @@ you're about to do the three steps below in the same turn — a claimed
|
|
|
141
151
|
command that's never executed or closed out sits there looking done while
|
|
142
152
|
blocking that queue slot, which is worse than never having claimed it.
|
|
143
153
|
|
|
144
|
-
1.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
is
|
|
154
|
+
1. Assess each command using your judgement: scope, evidence, permissions,
|
|
155
|
+
reversibility, and risk. Check-in is only a preview and must never claim
|
|
156
|
+
work automatically. Explicitly claim a specific command with
|
|
157
|
+
\`nexarch_claim_command_by_id\` when it is safe, clearly in scope, and you
|
|
158
|
+
can execute and close it in this session. Ask the human when the requested
|
|
159
|
+
work is ambiguous, consequential, destructive, external, or beyond your
|
|
160
|
+
authority.
|
|
148
161
|
2. **Execute \`command.resolved_playbook_text\` from the claim response** —
|
|
149
162
|
that field is the actual task. \`command.instructions\` is a different
|
|
150
163
|
field and is almost always \`null\`; don't mistake its emptiness for "no
|