@nexusclawhq/cli 0.3.61 → 0.3.63
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 +15 -0
- package/README.md +21 -0
- package/dist/build-info.json +4 -4
- package/dist/nexus-cli/src/cli-bug-diagnostics.test.js +46 -0
- package/dist/nexus-cli/src/cli-bug-diagnostics.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/ai/help.test.js +4 -4
- package/dist/nexus-cli/src/commands/commands.test.js +1 -1
- package/dist/nexus-cli/src/commands/commands.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/source/pull.js +1 -3
- package/dist/nexus-cli/src/commands/source/pull.js.map +1 -1
- package/dist/nexus-cli/src/commands/workforce/knowledge.js +37 -0
- package/dist/nexus-cli/src/commands/workforce/knowledge.js.map +1 -1
- package/dist/nexus-cli/src/contracts/command-contract-coverage-baseline.json +5 -5
- package/dist/nexus-cli/src/contracts/command-inventory.test.js +4 -4
- package/dist/nexus-cli/src/contracts/command-policy.exporter.test.js +2 -2
- package/dist/nexus-cli/src/contracts/command-policy.registry.test.js +4 -4
- package/dist/nexus-cli/src/contracts/command-policy.validator.test.js +3 -3
- package/dist/nexus-cli/src/contracts/workforce-contracts.js +2 -0
- package/dist/nexus-cli/src/contracts/workforce-contracts.js.map +1 -1
- package/dist/nexus-cli/src/services/source-command-governance.js +10 -1
- package/dist/nexus-cli/src/services/source-command-governance.js.map +1 -1
- package/dist/nexus-cli/src/services/source-pull-plan.js +5 -0
- package/dist/nexus-cli/src/services/source-pull-plan.js.map +1 -1
- package/dist/nexus-cli/src/services/source-pull-plan.test.js +37 -0
- package/dist/nexus-cli/src/services/source-pull-plan.test.js.map +1 -1
- package/dist/nexus-cli/src/services/video-transcript-source.d.ts +23 -0
- package/dist/nexus-cli/src/services/video-transcript-source.js +34 -0
- package/dist/nexus-cli/src/services/video-transcript-source.js.map +1 -0
- package/dist/nexus-cli/src/services/video-transcript-source.test.d.ts +1 -0
- package/dist/nexus-cli/src/services/video-transcript-source.test.js +30 -0
- package/dist/nexus-cli/src/services/video-transcript-source.test.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.d.ts +4 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.js +14 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.js.map +1 -1
- package/dist/nexus-cli/src/services/workforce-ops-remote.js +25 -6
- package/dist/nexus-cli/src/services/workforce-ops-remote.js.map +1 -1
- package/dist/nexus-cli/src/services/workforce-ops-remote.test.d.ts +1 -0
- package/dist/nexus-cli/src/services/workforce-ops-remote.test.js +57 -0
- package/dist/nexus-cli/src/services/workforce-ops-remote.test.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-test-remote.d.ts +1 -1
- package/dist/nexus-cli/src/services/workforce-test-remote.js +1 -1
- package/dist/nexus-cli/src/services/workforce-test-remote.test.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_http_1 = __importDefault(require("node:http"));
|
|
9
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
const node_test_1 = __importDefault(require("node:test"));
|
|
12
|
+
const auth_store_1 = require("./auth-store");
|
|
13
|
+
const workforce_ops_remote_1 = require("./workforce-ops-remote");
|
|
14
|
+
const actionable_error_1 = require("../runtime/actionable-error");
|
|
15
|
+
(0, node_test_1.default)('dispatch domain failures supply only local recovery commands', async () => {
|
|
16
|
+
let code = 'INTENT_CONFIDENCE_TOO_LOW';
|
|
17
|
+
const server = node_http_1.default.createServer((req, res) => {
|
|
18
|
+
let body = '';
|
|
19
|
+
req.on('data', chunk => body += chunk);
|
|
20
|
+
req.on('end', () => {
|
|
21
|
+
const request = JSON.parse(body);
|
|
22
|
+
res.setHeader('Content-Type', 'application/json');
|
|
23
|
+
res.end(JSON.stringify(String(request.query).includes('query CurrentUser')
|
|
24
|
+
? { data: { currentUser: { id: 'caller' } } }
|
|
25
|
+
: { errors: [{ message: '任务未分派', extensions: { code, details: { nextCommands: ['unsafe-remote-command'] } } }] }));
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
|
|
29
|
+
const address = server.address();
|
|
30
|
+
if (!address || typeof address === 'string')
|
|
31
|
+
throw new Error('port');
|
|
32
|
+
const oldHome = process.env.NEXUS_CLI_HOME;
|
|
33
|
+
const cliHome = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(), 'dispatch-domain-'));
|
|
34
|
+
process.env.NEXUS_CLI_HOME = cliHome;
|
|
35
|
+
try {
|
|
36
|
+
(0, auth_store_1.saveCredential)({ alias: 'dispatch-test', instanceUrl: `http://127.0.0.1:${address.port}`, accessToken: 'test', username: 'operator', orgId: 'workspace' });
|
|
37
|
+
for (code of ['INTENT_CONFIDENCE_TOO_LOW', 'INTENT_AGENT_UNAVAILABLE', 'INTENT_AGENT_ACCESS_DENIED']) {
|
|
38
|
+
await strict_1.default.rejects((0, workforce_ops_remote_1.dispatchAgentTaskRemote)({ targetOrg: 'dispatch-test', input: 'task' }), error => {
|
|
39
|
+
strict_1.default.ok(error instanceof actionable_error_1.CliActionableError);
|
|
40
|
+
strict_1.default.equal(error.code, code);
|
|
41
|
+
strict_1.default.equal(error.retryable, false);
|
|
42
|
+
strict_1.default.equal(error.nextCommands[0].command, 'nexus workforce task dispatch --help');
|
|
43
|
+
strict_1.default.doesNotMatch(JSON.stringify(error.nextCommands), /unsafe/);
|
|
44
|
+
return true;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
await new Promise(resolve => server.close(() => resolve()));
|
|
50
|
+
if (oldHome === undefined)
|
|
51
|
+
delete process.env.NEXUS_CLI_HOME;
|
|
52
|
+
else
|
|
53
|
+
process.env.NEXUS_CLI_HOME = oldHome;
|
|
54
|
+
node_fs_1.default.rmSync(cliHome, { recursive: true, force: true });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=workforce-ops-remote.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workforce-ops-remote.test.js","sourceRoot":"","sources":["../../../../src/services/workforce-ops-remote.test.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AACxC,sDAAyB;AACzB,0DAA6B;AAC7B,sDAAyB;AACzB,0DAA6B;AAC7B,0DAA6B;AAC7B,6CAA8C;AAC9C,iEAAiE;AACjE,kEAAiE;AACjE,IAAA,mBAAI,EAAC,8DAA8D,EAAE,KAAK,IAAI,EAAE;IAC9E,IAAI,IAAI,GAAG,2BAA2B,CAAC;IACvC,MAAM,MAAM,GAAG,mBAAI,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC5C,IAAI,IAAI,GAAG,EAAE,CAAC;QAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC;QACtD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACjB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjC,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;YAClD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,C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,MAAM,gBAAM,CAAC,OAAO,CAAC,IAAA,8CAAuB,EAAC,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;gBACnG,gBAAM,CAAC,EAAE,CAAC,KAAK,YAAY,qCAAkB,CAAC,CAAC;gBAC/C,gBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAAC,gBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBACrE,gBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,sCAAsC,CAAC,CAAC;gBACpF,gBAAM,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAClE,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;;YAAM,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC;QACxG,iBAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const WORKFORCE_TEST_CLI_VERSION = "0.3.
|
|
1
|
+
export declare const WORKFORCE_TEST_CLI_VERSION = "0.3.63";
|
|
2
2
|
export declare function assertWorkforceTestCompatibility(compatibilityVersion: string): void;
|
|
3
3
|
export declare const WORKFORCE_TEST_REGRESSION_QUERY = "\nquery AgentTestRegression($agentId: ID!, $suiteRunId: ID!) {\n agentTestRegression(agentId: $agentId, suiteRunId: $suiteRunId) { suiteRunId current baseline deltas }\n}";
|
|
4
4
|
export interface WorkforceTestSuiteMetrics {
|
|
@@ -12,7 +12,7 @@ exports.listTestResultsRemote = listTestResultsRemote;
|
|
|
12
12
|
exports.getTestBaselineRemote = getTestBaselineRemote;
|
|
13
13
|
exports.getTestRegressionRemote = getTestRegressionRemote;
|
|
14
14
|
const api_client_1 = require("./api-client");
|
|
15
|
-
exports.WORKFORCE_TEST_CLI_VERSION = '0.3.
|
|
15
|
+
exports.WORKFORCE_TEST_CLI_VERSION = '0.3.63';
|
|
16
16
|
function parseCompatibilityVersion(version) {
|
|
17
17
|
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version.trim());
|
|
18
18
|
if (!match)
|
|
@@ -22,10 +22,10 @@ const workforce_test_remote_1 = require("./workforce-test-remote");
|
|
|
22
22
|
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('unknown'), /did not publish cliCompatibilityVersion/);
|
|
23
23
|
});
|
|
24
24
|
(0, node_test_1.default)('evaluation preflight blocks a mismatched CLI/Core contract', () => {
|
|
25
|
-
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.4.0'), /CLI 0.3.
|
|
25
|
+
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.4.0'), /CLI 0.3.63, Core requires 0.4.0/);
|
|
26
26
|
});
|
|
27
27
|
(0, node_test_1.default)('evaluation preflight blocks an older CLI than the Core patch contract', () => {
|
|
28
|
-
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.3.
|
|
28
|
+
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.3.64'), /CLI 0.3.63, Core requires 0.3.64/);
|
|
29
29
|
});
|
|
30
30
|
(0, node_test_1.default)('regression query matches the native Core report fields', () => {
|
|
31
31
|
strict_1.default.match(workforce_test_remote_1.WORKFORCE_TEST_REGRESSION_QUERY, /suiteRunId current baseline deltas/);
|