@nexusclawhq/cli 0.3.19 → 0.3.21
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 +18 -0
- package/dist/build-info.json +4 -4
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/index.d.ts +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/index.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/types.d.ts +17 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/validator.js +22 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/employee-package/validator.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.d.ts +61 -7
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js +65 -11
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/index.d.ts +122 -14
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.d.ts +61 -7
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js +67 -13
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js.map +1 -1
- package/dist/nexus-cli/src/cli.js +2 -0
- package/dist/nexus-cli/src/cli.js.map +1 -1
- 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/employee/deploy.e2e.test.js +3 -3
- package/dist/nexus-cli/src/commands/employee/deploy.e2e.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/employee/deploy.js +22 -5
- package/dist/nexus-cli/src/commands/employee/deploy.js.map +1 -1
- package/dist/nexus-cli/src/commands/user/index.d.ts +2 -0
- package/dist/nexus-cli/src/commands/user/index.js +14 -0
- package/dist/nexus-cli/src/commands/user/index.js.map +1 -0
- package/dist/nexus-cli/src/commands/user/service-account.d.ts +2 -0
- package/dist/nexus-cli/src/commands/user/service-account.js +30 -0
- package/dist/nexus-cli/src/commands/user/service-account.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/agent.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/agent.js +50 -0
- package/dist/nexus-cli/src/commands/workforce/agent.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/index.js +2 -0
- package/dist/nexus-cli/src/commands/workforce/index.js.map +1 -1
- package/dist/nexus-cli/src/services/user-service-account-remote.d.ts +14 -0
- package/dist/nexus-cli/src/services/user-service-account-remote.js +56 -0
- package/dist/nexus-cli/src/services/user-service-account-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/user-service-account-remote.test.d.ts +1 -0
- package/dist/nexus-cli/src/services/user-service-account-remote.test.js +73 -0
- package/dist/nexus-cli/src/services/user-service-account-remote.test.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-agent-remote.d.ts +27 -0
- package/dist/nexus-cli/src/services/workforce-agent-remote.js +40 -0
- package/dist/nexus-cli/src/services/workforce-agent-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-bundle-archive.d.ts +1 -1
- package/dist/nexus-cli/src/services/workforce-bundle-remote.d.ts +1 -1
- 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 +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AgentIdentityView {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
status: string;
|
|
5
|
+
serviceUserId?: string | null;
|
|
6
|
+
roleId?: string | null;
|
|
7
|
+
orgNodeId?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function assignAgentIdentityRemote(options: {
|
|
10
|
+
targetOrg?: string;
|
|
11
|
+
agentId: string;
|
|
12
|
+
serviceUserId?: string | null;
|
|
13
|
+
}): Promise<AgentIdentityView>;
|
|
14
|
+
export declare function publishAgentRemote(options: {
|
|
15
|
+
targetOrg?: string;
|
|
16
|
+
agentId: string;
|
|
17
|
+
overrideTestGate?: boolean;
|
|
18
|
+
}): Promise<AgentIdentityView>;
|
|
19
|
+
export declare function archiveAgentRemote(options: {
|
|
20
|
+
targetOrg?: string;
|
|
21
|
+
agentId: string;
|
|
22
|
+
}): Promise<boolean>;
|
|
23
|
+
export declare function rollbackAgentVersionRemote(options: {
|
|
24
|
+
targetOrg?: string;
|
|
25
|
+
agentId: string;
|
|
26
|
+
versionId: string;
|
|
27
|
+
}): Promise<Record<string, unknown> | null>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assignAgentIdentityRemote = assignAgentIdentityRemote;
|
|
4
|
+
exports.publishAgentRemote = publishAgentRemote;
|
|
5
|
+
exports.archiveAgentRemote = archiveAgentRemote;
|
|
6
|
+
exports.rollbackAgentVersionRemote = rollbackAgentVersionRemote;
|
|
7
|
+
const api_client_1 = require("./api-client");
|
|
8
|
+
const AGENT_FIELDS = 'id name status serviceUserId roleId orgNodeId';
|
|
9
|
+
async function assignAgentIdentityRemote(options) {
|
|
10
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
11
|
+
const data = await client.graphql(`mutation AssignAgentRuntimeIdentity($agentId: ID!, $input: AssignAgentRuntimeIdentityInput!) {
|
|
12
|
+
assignAgentRuntimeIdentity(agentId: $agentId, input: $input) { ${AGENT_FIELDS} }
|
|
13
|
+
}`, {
|
|
14
|
+
agentId: options.agentId,
|
|
15
|
+
input: { serviceUserId: options.serviceUserId ?? null },
|
|
16
|
+
});
|
|
17
|
+
return data.assignAgentRuntimeIdentity;
|
|
18
|
+
}
|
|
19
|
+
async function publishAgentRemote(options) {
|
|
20
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
21
|
+
const data = await client.graphql(`mutation PublishAgent($agentId: ID!, $overrideTestGate: Boolean) {
|
|
22
|
+
publishAgent(agentId: $agentId, overrideTestGate: $overrideTestGate) { ${AGENT_FIELDS} }
|
|
23
|
+
}`, { agentId: options.agentId, overrideTestGate: Boolean(options.overrideTestGate) });
|
|
24
|
+
return data.publishAgent;
|
|
25
|
+
}
|
|
26
|
+
async function archiveAgentRemote(options) {
|
|
27
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
28
|
+
const data = await client.graphql('mutation ArchiveAgent($agentId: ID!) { archiveAgent(agentId: $agentId) }', { agentId: options.agentId });
|
|
29
|
+
return data.archiveAgent;
|
|
30
|
+
}
|
|
31
|
+
async function rollbackAgentVersionRemote(options) {
|
|
32
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
33
|
+
const data = await client.graphql(`mutation RollbackAgentVersion($agentId: ID!, $versionId: ID!) {
|
|
34
|
+
rollbackAgentVersion(agentId: $agentId, versionId: $versionId) {
|
|
35
|
+
id agentId versionNumber changeSummary createdAt
|
|
36
|
+
}
|
|
37
|
+
}`, { agentId: options.agentId, versionId: options.versionId });
|
|
38
|
+
return data.rollbackAgentVersion;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=workforce-agent-remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workforce-agent-remote.js","sourceRoot":"","sources":["../../../../src/services/workforce-agent-remote.ts"],"names":[],"mappings":";;AAaA,8DAgBC;AAED,gDAaC;AAED,gDAUC;AAED,gEAeC;AAzED,6CAA+C;AAW/C,MAAM,YAAY,GAAG,+CAA+C,CAAC;AAE9D,KAAK,UAAU,yBAAyB,CAAC,OAI/C;IACC,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClD,MAA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 export declare function buildCanonicalWorkforceBundleArchive(options: {
|
|
|
8
8
|
portableBundleDigest: `sha256:${string}`;
|
|
9
9
|
runtimeBindingsDigest: `sha256:${string}`;
|
|
10
10
|
fileCount: number;
|
|
11
|
-
declaredSurfaces: ("
|
|
11
|
+
declaredSurfaces: ("code" | "flow" | "employee")[];
|
|
12
12
|
}>;
|
|
@@ -14,7 +14,7 @@ export declare function prepareRemoteWorkforceBundle(options: {
|
|
|
14
14
|
portableBundleDigest: `sha256:${string}`;
|
|
15
15
|
runtimeBindingsDigest: `sha256:${string}`;
|
|
16
16
|
fileCount: number;
|
|
17
|
-
declaredSurfaces: ("
|
|
17
|
+
declaredSurfaces: ("code" | "flow" | "employee")[];
|
|
18
18
|
};
|
|
19
19
|
sealed: import("./api-client").SealedExecutablePackageArtifact;
|
|
20
20
|
artifactInput: {
|
|
@@ -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.21';
|
|
16
16
|
function assertWorkforceTestCompatibility(compatibilityVersion) {
|
|
17
17
|
if (!compatibilityVersion || compatibilityVersion === 'unknown') {
|
|
18
18
|
throw new Error('Core did not publish cliCompatibilityVersion; evaluation preflight is blocked.');
|
|
@@ -19,6 +19,6 @@ const workforce_test_remote_1 = require("./workforce-test-remote");
|
|
|
19
19
|
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('unknown'), /did not publish cliCompatibilityVersion/);
|
|
20
20
|
});
|
|
21
21
|
(0, node_test_1.default)('evaluation preflight blocks a mismatched CLI/Core contract', () => {
|
|
22
|
-
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.3.10'), /CLI 0.3.
|
|
22
|
+
strict_1.default.throws(() => (0, workforce_test_remote_1.assertWorkforceTestCompatibility)('0.3.10'), /CLI 0.3.21, Core requires 0.3.10/);
|
|
23
23
|
});
|
|
24
24
|
//# sourceMappingURL=workforce-test-remote.test.js.map
|