nexarch 0.12.35 → 0.12.39
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/agent-identify.js +2 -1
- package/dist/commands/init-agent.js +2 -1
- package/dist/lib/mcp.js +22 -5
- package/dist/lib/skills.js +23 -21
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { homedir } from "os";
|
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { requireCredentials } from "../lib/credentials.js";
|
|
6
6
|
import { callMcpTool, mcpInitialize, mcpListTools } from "../lib/mcp.js";
|
|
7
|
+
import { cliVersion } from "../lib/version.js";
|
|
7
8
|
function parseFlag(args, flag) {
|
|
8
9
|
return args.includes(flag);
|
|
9
10
|
}
|
|
@@ -60,7 +61,7 @@ export async function agentIdentify(args) {
|
|
|
60
61
|
const client = parseOptionValue(args, "--client");
|
|
61
62
|
const sessionId = parseOptionValue(args, "--session-id");
|
|
62
63
|
const framework = parseOptionValue(args, "--framework");
|
|
63
|
-
const toolVersion = parseOptionValue(args, "--tool-version");
|
|
64
|
+
const toolVersion = parseOptionValue(args, "--tool-version") ?? cliVersion();
|
|
64
65
|
const capabilities = parseCsv(parseOptionValue(args, "--capabilities"));
|
|
65
66
|
const notes = parseOptionValue(args, "--notes");
|
|
66
67
|
if (!provider || !model || !client) {
|
|
@@ -8,6 +8,7 @@ import { requireCredentials } from "../lib/credentials.js";
|
|
|
8
8
|
import { fetchAgentRegistryOrThrow } from "../lib/agent-registry.js";
|
|
9
9
|
import { callMcpTool, mcpInitialize, mcpListTools } from "../lib/mcp.js";
|
|
10
10
|
import { buildVersionAttributes } from "../lib/version-normalization.js";
|
|
11
|
+
import { cliVersion } from "../lib/version.js";
|
|
11
12
|
import { requestTrustAttestation, TRUST_ATTESTATION_SCOPE } from "../lib/trust.js";
|
|
12
13
|
const CLI_VERSION = (() => {
|
|
13
14
|
try {
|
|
@@ -684,7 +685,7 @@ export async function initAgent(args) {
|
|
|
684
685
|
const clientArg = parseOptionValue(args, "--client");
|
|
685
686
|
const frameworkArg = parseOptionValue(args, "--framework");
|
|
686
687
|
const sessionIdArg = parseOptionValue(args, "--session-id");
|
|
687
|
-
const toolVersionArg = parseOptionValue(args, "--tool-version");
|
|
688
|
+
const toolVersionArg = parseOptionValue(args, "--tool-version") ?? cliVersion();
|
|
688
689
|
const capabilitiesArg = parseCsv(parseOptionValue(args, "--capabilities"));
|
|
689
690
|
const notesArg = parseOptionValue(args, "--notes");
|
|
690
691
|
const agentId = explicitAgentId ?? getDefaultAgentId();
|
package/dist/lib/mcp.js
CHANGED
|
@@ -51,12 +51,29 @@ async function requestOnce(method, params, options) {
|
|
|
51
51
|
const raw = Buffer.concat(chunks).toString("utf-8");
|
|
52
52
|
const json = JSON.parse(raw);
|
|
53
53
|
if (json.error) {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
typeof json.error.data.detail === "string"
|
|
58
|
-
? json.error.data.detail
|
|
54
|
+
const errData = json.error.data;
|
|
55
|
+
const explicitDetail = errData && typeof errData === "object" && "detail" in errData && typeof errData.detail === "string"
|
|
56
|
+
? errData.detail
|
|
59
57
|
: null;
|
|
58
|
+
// INVALID_TOOL_ARGUMENTS carries Zod detail — without this,
|
|
59
|
+
// every schema violation surfaced as the bare, undiagnosable
|
|
60
|
+
// "Invalid tool arguments" and nothing else, e.g. a missing
|
|
61
|
+
// required entity field on a create looked identical to an
|
|
62
|
+
// unrelated request shape mistake. Prefer `issues` (full dotted
|
|
63
|
+
// path per error, e.g. "entities.0.name: Required") over the
|
|
64
|
+
// older `fieldErrors` shape, which collapses a nested path down
|
|
65
|
+
// to just its top-level key and loses which field/index failed.
|
|
66
|
+
const zodDetail = !explicitDetail && errData && typeof errData === "object" && "issues" in errData
|
|
67
|
+
? errData.issues
|
|
68
|
+
.map(({ path, message }) => (path ? `${path}: ${message}` : message))
|
|
69
|
+
.join("; ") || null
|
|
70
|
+
: !explicitDetail && errData && typeof errData === "object" && "fieldErrors" in errData
|
|
71
|
+
? Object.entries(errData.fieldErrors)
|
|
72
|
+
.filter(([, messages]) => Array.isArray(messages) && messages.length > 0)
|
|
73
|
+
.map(([field, messages]) => `${field}: ${messages.join(", ")}`)
|
|
74
|
+
.join("; ") || null
|
|
75
|
+
: null;
|
|
76
|
+
const detail = explicitDetail ?? zodDetail;
|
|
60
77
|
reject(new Error(detail ? `${json.error.message} (${detail})` : json.error.message));
|
|
61
78
|
}
|
|
62
79
|
else if (json.result !== undefined) {
|
package/dist/lib/skills.js
CHANGED
|
@@ -104,28 +104,30 @@ skill is the check-in → claim → complete loop for working that queue.
|
|
|
104
104
|
- \`nexarch_check_in\` previews pending commands and draft/proposed
|
|
105
105
|
applications for this agent. It does **not** claim or change anything —
|
|
106
106
|
safe to call any time, including proactively at the start of a session.
|
|
107
|
-
- If you have a **confirmed**
|
|
108
|
-
|
|
109
|
-
\`
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
applications
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
107
|
+
- If you have a **confirmed** ref — returned by an earlier tool call in this
|
|
108
|
+
session (\`target_entity_key\` from a prior check-in, \`nexarch_list_entities\`,
|
|
109
|
+
\`nexarch_resolve_reference\`), or the human gave you the exact ref — pass
|
|
110
|
+
it as \`applicationContext: { accessibleApplicationRefs: ["<ref>"] }\` on
|
|
111
|
+
this **first** call to skip a redundant round trip.
|
|
112
|
+
- **A project ref works here too, and is often the one you actually have.**
|
|
113
|
+
You're usually registered against the repository's \`project:\` ref, not
|
|
114
|
+
any specific \`application:\` ref inside it — passing the project ref is
|
|
115
|
+
fine; check-in expands it to every application \`sourced_from\` it and
|
|
116
|
+
scopes to all of them. A monorepo project can source several
|
|
117
|
+
applications, so this is different from — and safer than — guessing which
|
|
118
|
+
single application ref applies: don't construct an application ref by
|
|
119
|
+
pattern-matching the project/repo name (\`project:veri_viva_platform\` does
|
|
120
|
+
not imply \`application:veri_viva_platform\` exists; the real one might be
|
|
121
|
+
\`application:veri_viva_platform_website\` or something else entirely).
|
|
122
|
+
Pass the project ref you actually have, not a guessed application ref.
|
|
123
|
+
- If a scoped call's response includes \`project_ref_expanded_to_applications\`,
|
|
124
|
+
that's normal — it's telling you which application(s) a project ref
|
|
125
|
+
resolved to. \`application_context_ref_unresolved\` means a ref you passed
|
|
126
|
+
matched nothing at all. \`pending_commands_outside_requested_scope\` means
|
|
127
|
+
the resolved scope still didn't cover everything pending — call check-in
|
|
128
|
+
again with no \`applicationContext\` to see the rest.
|
|
122
129
|
- Calling bare (no \`applicationContext\`) is always safe and returns every
|
|
123
|
-
pending command's real \`target_entity_key\`
|
|
124
|
-
informed scoped call afterward.
|
|
125
|
-
- If a scoped call's response includes a
|
|
126
|
-
\`pending_commands_outside_requested_scope\` warning, the ref you supplied
|
|
127
|
-
didn't match everything — it's very likely wrong. Re-call bare rather than
|
|
128
|
-
trusting the (incomplete) result.
|
|
130
|
+
pending command's real \`target_entity_key\` if you have no ref at all yet.
|
|
129
131
|
- Report exactly what check-in found. Don't reinterpret "check in" as
|
|
130
132
|
registration (\`init-agent\`) or as a general health check
|
|
131
133
|
(\`nexarch_get_governance_summary\`) — they're different actions.
|