@nexusclawhq/cli 0.2.3 → 0.3.0
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 +11 -0
- package/README.md +5 -0
- package/dist/build-info.json +5 -5
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/agent-executable-assets/cli-contract.types.d.ts +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.d.ts +19 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.d.ts +686 -95
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js +19426 -18705
- 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 +1372 -190
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.d.ts +686 -95
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js +19467 -18789
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-route-readiness/index.js +2 -11
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/platform-admin-route-readiness/index.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/package.json +5 -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/ai/help.test.js +11 -29
- package/dist/nexus-cli/src/commands/ai/help.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/commands.test.js +81 -1
- package/dist/nexus-cli/src/commands/commands.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/employee/deploy.js +35 -9
- package/dist/nexus-cli/src/commands/employee/deploy.js.map +1 -1
- package/dist/nexus-cli/src/commands/org/index.js +2 -0
- package/dist/nexus-cli/src/commands/org/index.js.map +1 -1
- package/dist/nexus-cli/src/commands/org/login-web.d.ts +7 -0
- package/dist/nexus-cli/src/commands/org/login-web.js +31 -4
- package/dist/nexus-cli/src/commands/org/login-web.js.map +1 -1
- package/dist/nexus-cli/src/commands/org/login-web.test.js +15 -0
- package/dist/nexus-cli/src/commands/org/login-web.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/org/step-up.d.ts +2 -0
- package/dist/nexus-cli/src/commands/org/step-up.js +75 -0
- package/dist/nexus-cli/src/commands/org/step-up.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/approval.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/approval.js +60 -0
- package/dist/nexus-cli/src/commands/workforce/approval.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/cognition.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/cognition.js +62 -0
- package/dist/nexus-cli/src/commands/workforce/cognition.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/constitution.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/constitution.js +37 -0
- package/dist/nexus-cli/src/commands/workforce/constitution.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/guardrail.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/guardrail.js +67 -0
- package/dist/nexus-cli/src/commands/workforce/guardrail.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/index.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/index.js +43 -0
- package/dist/nexus-cli/src/commands/workforce/index.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/knowledge.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/knowledge.js +143 -0
- package/dist/nexus-cli/src/commands/workforce/knowledge.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/learning.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/learning.js +146 -0
- package/dist/nexus-cli/src/commands/workforce/learning.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/observe.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/observe.js +152 -0
- package/dist/nexus-cli/src/commands/workforce/observe.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/orchestration.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/orchestration.js +199 -0
- package/dist/nexus-cli/src/commands/workforce/orchestration.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/permission.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/permission.js +113 -0
- package/dist/nexus-cli/src/commands/workforce/permission.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/prompt.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/prompt.js +137 -0
- package/dist/nexus-cli/src/commands/workforce/prompt.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/provider.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/provider.js +152 -0
- package/dist/nexus-cli/src/commands/workforce/provider.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/rehearsal.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/rehearsal.js +71 -0
- package/dist/nexus-cli/src/commands/workforce/rehearsal.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/release.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/release.js +24 -0
- package/dist/nexus-cli/src/commands/workforce/release.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/shared.d.ts +8 -0
- package/dist/nexus-cli/src/commands/workforce/shared.js +86 -0
- package/dist/nexus-cli/src/commands/workforce/shared.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/sop.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/sop.js +86 -0
- package/dist/nexus-cli/src/commands/workforce/sop.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/task.d.ts +4 -0
- package/dist/nexus-cli/src/commands/workforce/task.js +67 -0
- package/dist/nexus-cli/src/commands/workforce/task.js.map +1 -0
- package/dist/nexus-cli/src/commands/workforce/test-case.d.ts +2 -0
- package/dist/nexus-cli/src/commands/workforce/test-case.js +121 -0
- package/dist/nexus-cli/src/commands/workforce/test-case.js.map +1 -0
- package/dist/nexus-cli/src/config/platform-seed-registry.json +134 -0
- package/dist/nexus-cli/src/contracts/command-contract.guard.js +25 -2
- package/dist/nexus-cli/src/contracts/command-contract.guard.js.map +1 -1
- package/dist/nexus-cli/src/contracts/command-contract.registry.js +2 -0
- package/dist/nexus-cli/src/contracts/command-contract.registry.js.map +1 -1
- package/dist/nexus-cli/src/contracts/contracts.test.js +40 -54
- package/dist/nexus-cli/src/contracts/contracts.test.js.map +1 -1
- package/dist/nexus-cli/src/contracts/workforce-contracts.d.ts +2 -0
- package/dist/nexus-cli/src/contracts/workforce-contracts.js +175 -0
- package/dist/nexus-cli/src/contracts/workforce-contracts.js.map +1 -0
- package/dist/nexus-cli/src/services/api-client.d.ts +37 -1
- package/dist/nexus-cli/src/services/api-client.js +120 -34
- package/dist/nexus-cli/src/services/api-client.js.map +1 -1
- package/dist/nexus-cli/src/services/api-client.test.js +87 -0
- package/dist/nexus-cli/src/services/api-client.test.js.map +1 -1
- package/dist/nexus-cli/src/services/package-self-containment.js +1 -0
- package/dist/nexus-cli/src/services/package-self-containment.js.map +1 -1
- package/dist/nexus-cli/src/services/step-up-helper.d.ts +43 -0
- package/dist/nexus-cli/src/services/step-up-helper.js +98 -0
- package/dist/nexus-cli/src/services/step-up-helper.js.map +1 -0
- package/dist/nexus-cli/src/services/step-up-helper.test.d.ts +1 -0
- package/dist/nexus-cli/src/services/step-up-helper.test.js +176 -0
- package/dist/nexus-cli/src/services/step-up-helper.test.js.map +1 -0
- package/dist/nexus-cli/src/services/step-up-interactive.d.ts +2 -0
- package/dist/nexus-cli/src/services/step-up-interactive.js +69 -0
- package/dist/nexus-cli/src/services/step-up-interactive.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-cognition-remote.d.ts +27 -0
- package/dist/nexus-cli/src/services/workforce-cognition-remote.js +48 -0
- package/dist/nexus-cli/src/services/workforce-cognition-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-common.d.ts +2 -0
- package/dist/nexus-cli/src/services/workforce-common.js +20 -0
- package/dist/nexus-cli/src/services/workforce-common.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-config-remote.d.ts +127 -0
- package/dist/nexus-cli/src/services/workforce-config-remote.js +205 -0
- package/dist/nexus-cli/src/services/workforce-config-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-distillation-remote.d.ts +118 -0
- package/dist/nexus-cli/src/services/workforce-distillation-remote.js +171 -0
- package/dist/nexus-cli/src/services/workforce-distillation-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.d.ts +105 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.js +174 -0
- package/dist/nexus-cli/src/services/workforce-guardrail-knowledge-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-learning-remote.d.ts +131 -0
- package/dist/nexus-cli/src/services/workforce-learning-remote.js +179 -0
- package/dist/nexus-cli/src/services/workforce-learning-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-observe-remote.d.ts +97 -0
- package/dist/nexus-cli/src/services/workforce-observe-remote.js +207 -0
- package/dist/nexus-cli/src/services/workforce-observe-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-ops-remote.d.ts +94 -0
- package/dist/nexus-cli/src/services/workforce-ops-remote.js +176 -0
- package/dist/nexus-cli/src/services/workforce-ops-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-orchestration-remote.d.ts +132 -0
- package/dist/nexus-cli/src/services/workforce-orchestration-remote.js +244 -0
- package/dist/nexus-cli/src/services/workforce-orchestration-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-permission-remote.d.ts +72 -0
- package/dist/nexus-cli/src/services/workforce-permission-remote.js +130 -0
- package/dist/nexus-cli/src/services/workforce-permission-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-provider-remote.d.ts +82 -0
- package/dist/nexus-cli/src/services/workforce-provider-remote.js +129 -0
- package/dist/nexus-cli/src/services/workforce-provider-remote.js.map +1 -0
- package/dist/nexus-cli/src/services/workforce-test-remote.d.ts +85 -0
- package/dist/nexus-cli/src/services/workforce-test-remote.js +134 -0
- package/dist/nexus-cli/src/services/workforce-test-remote.js.map +1 -0
- package/dist/nexus-cli/src/templates/project/template-manifest.json +11 -5
- package/dist/nexus-cli/src/templates/project/templates/base-crm/README.md.tpl +4 -3
- package/dist/nexus-cli/src/templates/project/templates/base-crm/nexus-project.json.tpl +77 -13
- package/dist/nexus-cli/src/templates/project/templates/base-crm/nexus-project.yaml.tpl +68 -0
- package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/README.md.tpl +4 -4
- package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/nexus-project.json.tpl +77 -13
- package/dist/nexus-cli/src/templates/project/templates/demo-public-channel-store-delivery/nexus-project.yaml.tpl +71 -0
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/README.md.tpl +4 -4
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-app/main/default/isolated/drill-code-extension-page.manifest.json +63 -0
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-app/main/default/nwc/drill-code-extension-page/index.js +70 -0
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-app/main/default/tests/drill-code-extension-page.assertions.json +13 -0
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-project.json.tpl +61 -7
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/nexus-project.yaml.tpl +58 -0
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/preview/drill-code-extension-page.html +1 -1
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/scripts/build-component.mjs +1 -1
- package/dist/nexus-cli/src/templates/project/templates/drill-code-extension-page/scripts/deploy-drill.mjs +1 -1
- package/dist/nexus-cli/src/templates/project/templates/empty/README.md.tpl +3 -2
- package/dist/nexus-cli/src/templates/project/templates/empty/nexus-project.json.tpl +79 -13
- package/dist/nexus-cli/src/templates/project/templates/empty/nexus-project.yaml.tpl +67 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/agent-instructions/claude.md +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/agent-instructions/codex.md +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/agent-instructions/generic.md +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/agent-instructions/glm-5.2.md +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/authoring/code-sdk.d.ts +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/authoring/command-order.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/authoring/flow-node-catalog.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/catalogs/ai-policies.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/catalogs/approval-policies.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/catalogs/connectors.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/catalogs/invokable-units.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/catalogs/objects.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/cli-contract.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/context-lock.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/context-manifest.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/examples/code/minimal-action.cases.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/examples/code/minimal-action.input.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/examples/code/minimal-action.output.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/examples/code/minimal-action.ts +3 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/examples/flow/minimal-manual-flow.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/agent-code-tool-catalog-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/ai-workforce-executable-bundle-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/approval-policy-authoring-catalog-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/code-action-cases-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/code-extension-governance-v2.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/employee-package-v2.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/flow-package-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/flows-payload-v2.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/object-authoring-catalog-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/workforce-bundle-lock-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/workforce-release-evidence-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/workforce-runtime-bindings-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/schemas/workspace-authoring-contract-v1.schema.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/.nexusclaw/context/workspace-contract.json +1 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/README.md.tpl +41 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/nexus-project.json.tpl +86 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/nexus-project.yaml.tpl +61 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/package.json.tpl +25 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/.nexusclaw/scaffold.json +12 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/agent-tools.json +53 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/code/genericLookup.ts +5 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/package.yaml +28 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/schemas/genericLookup.input.schema.json +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/schemas/genericLookup.output.schema.json +6 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-action/tests/genericLookup.cases.json +26 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/packages/generic-flow/GenericFollowUp.flow.yaml +10 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/scripts/init-bundle.mjs +25 -0
- package/dist/nexus-cli/src/templates/project/templates/executable-workforce/tsconfig.json.tpl +10 -0
- package/dist/nexus-cli/src/templates/project/templates/industry-education/README.md.tpl +7 -1
- package/dist/nexus-cli/src/templates/project/templates/industry-education/nexus-project.json.tpl +77 -14
- package/dist/nexus-cli/src/templates/project/templates/industry-education/nexus-project.yaml.tpl +69 -0
- package/dist/nexus-cli/src/templates/project/templates/industry-finance/README.md.tpl +7 -1
- package/dist/nexus-cli/src/templates/project/templates/industry-finance/nexus-project.json.tpl +77 -14
- package/dist/nexus-cli/src/templates/project/templates/industry-finance/nexus-project.yaml.tpl +69 -0
- package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/README.md.tpl +7 -1
- package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/nexus-project.json.tpl +77 -14
- package/dist/nexus-cli/src/templates/project/templates/industry-healthcare/nexus-project.yaml.tpl +69 -0
- package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/README.md.tpl +4 -4
- package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/nexus-project.json.tpl +77 -13
- package/dist/nexus-cli/src/templates/project/templates/industry-partner-cloud/nexus-project.yaml.tpl +69 -0
- package/dist/nexus-cli/src/templates/project/templates/industry-retail/README.md.tpl +7 -1
- package/dist/nexus-cli/src/templates/project/templates/industry-retail/nexus-project.json.tpl +77 -14
- package/dist/nexus-cli/src/templates/project/templates/industry-retail/nexus-project.yaml.tpl +69 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publishConstitutionRemote = publishConstitutionRemote;
|
|
4
|
+
exports.rollbackConstitutionRemote = rollbackConstitutionRemote;
|
|
5
|
+
exports.getConstitutionRemote = getConstitutionRemote;
|
|
6
|
+
exports.listConstitutionVersionsRemote = listConstitutionVersionsRemote;
|
|
7
|
+
exports.createPromptStrategyRemote = createPromptStrategyRemote;
|
|
8
|
+
exports.updatePromptStrategyRemote = updatePromptStrategyRemote;
|
|
9
|
+
exports.activatePromptStrategyRemote = activatePromptStrategyRemote;
|
|
10
|
+
exports.deactivatePromptStrategyRemote = deactivatePromptStrategyRemote;
|
|
11
|
+
exports.deletePromptStrategyRemote = deletePromptStrategyRemote;
|
|
12
|
+
exports.createPromptTemplateRemote = createPromptTemplateRemote;
|
|
13
|
+
exports.updatePromptTemplateRemote = updatePromptTemplateRemote;
|
|
14
|
+
exports.rollbackPromptTemplateRemote = rollbackPromptTemplateRemote;
|
|
15
|
+
exports.deletePromptTemplateRemote = deletePromptTemplateRemote;
|
|
16
|
+
exports.draftPromptTemplateRemote = draftPromptTemplateRemote;
|
|
17
|
+
exports.testPromptRemote = testPromptRemote;
|
|
18
|
+
const api_client_1 = require("./api-client");
|
|
19
|
+
const workforce_common_1 = require("./workforce-common");
|
|
20
|
+
const PUBLISH_CONSTITUTION = `
|
|
21
|
+
mutation PublishWorkspaceConstitution($input: PublishWorkspaceConstitutionInput!) {
|
|
22
|
+
publishWorkspaceConstitution(input: $input) { id workspaceId content versionNumber isActive publishedAt publishedBy }
|
|
23
|
+
}`;
|
|
24
|
+
const ROLLBACK_CONSTITUTION = `
|
|
25
|
+
mutation RollbackWorkspaceConstitution($input: RollbackWorkspaceConstitutionInput!) {
|
|
26
|
+
rollbackWorkspaceConstitution(input: $input) { id workspaceId content versionNumber isActive publishedAt publishedBy }
|
|
27
|
+
}`;
|
|
28
|
+
const GET_CONSTITUTION = `
|
|
29
|
+
query WorkspaceConstitution { workspaceConstitution { id workspaceId content versionNumber isActive publishedAt publishedBy } }`;
|
|
30
|
+
const LIST_CONSTITUTION_VERSIONS = `
|
|
31
|
+
query WorkspaceConstitutionVersions { workspaceConstitutionVersions { id versionNumber content isActive publishedAt publishedBy } }`;
|
|
32
|
+
async function publishConstitutionRemote(options) {
|
|
33
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
34
|
+
const data = await client.graphql(PUBLISH_CONSTITUTION, { input: { content: options.content } });
|
|
35
|
+
return data.publishWorkspaceConstitution;
|
|
36
|
+
}
|
|
37
|
+
async function rollbackConstitutionRemote(options) {
|
|
38
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
39
|
+
const data = await client.graphql(ROLLBACK_CONSTITUTION, {
|
|
40
|
+
input: { targetVersionNumber: options.targetVersionNumber },
|
|
41
|
+
});
|
|
42
|
+
return data.rollbackWorkspaceConstitution;
|
|
43
|
+
}
|
|
44
|
+
async function getConstitutionRemote(options) {
|
|
45
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
46
|
+
const data = await client.graphql(GET_CONSTITUTION, {});
|
|
47
|
+
return data.workspaceConstitution;
|
|
48
|
+
}
|
|
49
|
+
async function listConstitutionVersionsRemote(options) {
|
|
50
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
51
|
+
const data = await client.graphql(LIST_CONSTITUTION_VERSIONS, {});
|
|
52
|
+
return data.workspaceConstitutionVersions ?? [];
|
|
53
|
+
}
|
|
54
|
+
const CREATE_PROMPT_STRATEGY = `
|
|
55
|
+
mutation CreatePromptStrategy($input: CreatePromptStrategyInput!) {
|
|
56
|
+
createPromptStrategy(input: $input) { id workspaceId name description industry templateOverrides isActive createdAt }
|
|
57
|
+
}`;
|
|
58
|
+
const UPDATE_PROMPT_STRATEGY = `
|
|
59
|
+
mutation UpdatePromptStrategy($id: ID!, $input: UpdatePromptStrategyInput!) {
|
|
60
|
+
updatePromptStrategy(id: $id, input: $input) { id workspaceId name description industry templateOverrides isActive createdAt }
|
|
61
|
+
}`;
|
|
62
|
+
const ACTIVATE_PROMPT_STRATEGY = `
|
|
63
|
+
mutation ActivatePromptStrategy($id: ID!) { activatePromptStrategy(id: $id) { id isActive } }`;
|
|
64
|
+
const DEACTIVATE_PROMPT_STRATEGY = `
|
|
65
|
+
mutation DeactivatePromptStrategy($id: ID!) { deactivatePromptStrategy(id: $id) { id isActive } }`;
|
|
66
|
+
const DELETE_PROMPT_STRATEGY = `
|
|
67
|
+
mutation DeletePromptStrategy($id: ID!) { deletePromptStrategy(id: $id) }`;
|
|
68
|
+
async function createPromptStrategyRemote(options) {
|
|
69
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
70
|
+
const input = {
|
|
71
|
+
workspaceId: (0, workforce_common_1.resolveWorkspaceId)(options.targetOrg),
|
|
72
|
+
name: options.name,
|
|
73
|
+
};
|
|
74
|
+
if (options.description !== undefined)
|
|
75
|
+
input.description = options.description;
|
|
76
|
+
if (options.industry !== undefined)
|
|
77
|
+
input.industry = options.industry;
|
|
78
|
+
if (options.templateOverrides !== undefined)
|
|
79
|
+
input.templateOverrides = options.templateOverrides;
|
|
80
|
+
const data = await client.graphql(CREATE_PROMPT_STRATEGY, { input });
|
|
81
|
+
return data.createPromptStrategy;
|
|
82
|
+
}
|
|
83
|
+
async function updatePromptStrategyRemote(options) {
|
|
84
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
85
|
+
const input = {};
|
|
86
|
+
if (options.name !== undefined)
|
|
87
|
+
input.name = options.name;
|
|
88
|
+
if (options.description !== undefined)
|
|
89
|
+
input.description = options.description;
|
|
90
|
+
if (options.industry !== undefined)
|
|
91
|
+
input.industry = options.industry;
|
|
92
|
+
if (options.templateOverrides !== undefined)
|
|
93
|
+
input.templateOverrides = options.templateOverrides;
|
|
94
|
+
const data = await client.graphql(UPDATE_PROMPT_STRATEGY, { id: options.id, input });
|
|
95
|
+
return data.updatePromptStrategy;
|
|
96
|
+
}
|
|
97
|
+
async function activatePromptStrategyRemote(options) {
|
|
98
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
99
|
+
const data = await client.graphql(ACTIVATE_PROMPT_STRATEGY, { id: options.id });
|
|
100
|
+
return data.activatePromptStrategy;
|
|
101
|
+
}
|
|
102
|
+
async function deactivatePromptStrategyRemote(options) {
|
|
103
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
104
|
+
const data = await client.graphql(DEACTIVATE_PROMPT_STRATEGY, { id: options.id });
|
|
105
|
+
return data.deactivatePromptStrategy;
|
|
106
|
+
}
|
|
107
|
+
async function deletePromptStrategyRemote(options) {
|
|
108
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
109
|
+
const data = await client.graphql(DELETE_PROMPT_STRATEGY, { id: options.id });
|
|
110
|
+
return data;
|
|
111
|
+
}
|
|
112
|
+
const CREATE_PROMPT_TEMPLATE = `
|
|
113
|
+
mutation CreatePromptTemplate($input: CreatePromptTemplateGqlInput!) {
|
|
114
|
+
createPromptTemplate(input: $input) { id workspaceId scene name template variables modelId modelProvider createdAt }
|
|
115
|
+
}`;
|
|
116
|
+
const UPDATE_PROMPT_TEMPLATE = `
|
|
117
|
+
mutation UpdatePromptTemplate($id: ID!, $input: UpdatePromptTemplateGqlInput!) {
|
|
118
|
+
updatePromptTemplate(id: $id, input: $input) { id workspaceId scene name template variables modelId modelProvider createdAt }
|
|
119
|
+
}`;
|
|
120
|
+
const ROLLBACK_PROMPT_TEMPLATE = `
|
|
121
|
+
mutation RollbackPromptTemplate($id: ID!, $versionNumber: Int!) {
|
|
122
|
+
rollbackPromptTemplate(id: $id, versionNumber: $versionNumber) { id versionNumber template }
|
|
123
|
+
}`;
|
|
124
|
+
const DELETE_PROMPT_TEMPLATE = `
|
|
125
|
+
mutation DeletePromptTemplate($id: ID!) { deletePromptTemplate(id: $id) }`;
|
|
126
|
+
const AI_DRAFT_PROMPT_TEMPLATE = `
|
|
127
|
+
mutation AiDraftPromptTemplate($input: AiDraftTemplateGqlInput!) {
|
|
128
|
+
aiDraftPromptTemplate(input: $input) { template variables model }
|
|
129
|
+
}`;
|
|
130
|
+
const AI_TEST_PROMPT = `
|
|
131
|
+
mutation AiTestPrompt($input: AiTestPromptGqlInput!) {
|
|
132
|
+
aiTestPrompt(input: $input) { output model tokensUsed latencyMs }
|
|
133
|
+
}`;
|
|
134
|
+
async function createPromptTemplateRemote(options) {
|
|
135
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
136
|
+
const input = {
|
|
137
|
+
workspaceId: (0, workforce_common_1.resolveWorkspaceId)(options.targetOrg),
|
|
138
|
+
scene: options.scene,
|
|
139
|
+
name: options.name,
|
|
140
|
+
template: options.template,
|
|
141
|
+
};
|
|
142
|
+
if (options.variables !== undefined)
|
|
143
|
+
input.variables = options.variables;
|
|
144
|
+
if (options.modelId !== undefined)
|
|
145
|
+
input.modelId = options.modelId;
|
|
146
|
+
if (options.modelProvider !== undefined)
|
|
147
|
+
input.modelProvider = options.modelProvider;
|
|
148
|
+
const data = await client.graphql(CREATE_PROMPT_TEMPLATE, { input });
|
|
149
|
+
return data.createPromptTemplate;
|
|
150
|
+
}
|
|
151
|
+
async function updatePromptTemplateRemote(options) {
|
|
152
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
153
|
+
const input = {};
|
|
154
|
+
if (options.name !== undefined)
|
|
155
|
+
input.name = options.name;
|
|
156
|
+
if (options.template !== undefined)
|
|
157
|
+
input.template = options.template;
|
|
158
|
+
if (options.variables !== undefined)
|
|
159
|
+
input.variables = options.variables;
|
|
160
|
+
if (options.modelId !== undefined)
|
|
161
|
+
input.modelId = options.modelId;
|
|
162
|
+
if (options.modelProvider !== undefined)
|
|
163
|
+
input.modelProvider = options.modelProvider;
|
|
164
|
+
const data = await client.graphql(UPDATE_PROMPT_TEMPLATE, { id: options.id, input });
|
|
165
|
+
return data.updatePromptTemplate;
|
|
166
|
+
}
|
|
167
|
+
async function rollbackPromptTemplateRemote(options) {
|
|
168
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
169
|
+
const data = await client.graphql(ROLLBACK_PROMPT_TEMPLATE, { id: options.id, versionNumber: options.versionNumber });
|
|
170
|
+
return data.rollbackPromptTemplate;
|
|
171
|
+
}
|
|
172
|
+
async function deletePromptTemplateRemote(options) {
|
|
173
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
174
|
+
const data = await client.graphql(DELETE_PROMPT_TEMPLATE, { id: options.id });
|
|
175
|
+
return data;
|
|
176
|
+
}
|
|
177
|
+
async function draftPromptTemplateRemote(options) {
|
|
178
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
179
|
+
const input = {
|
|
180
|
+
intention: options.intention,
|
|
181
|
+
workspaceId: (0, workforce_common_1.resolveWorkspaceId)(options.targetOrg),
|
|
182
|
+
};
|
|
183
|
+
if (options.modelId !== undefined)
|
|
184
|
+
input.modelId = options.modelId;
|
|
185
|
+
if (options.modelProvider !== undefined)
|
|
186
|
+
input.modelProvider = options.modelProvider;
|
|
187
|
+
const data = await client.graphql(AI_DRAFT_PROMPT_TEMPLATE, { input });
|
|
188
|
+
return data.aiDraftPromptTemplate;
|
|
189
|
+
}
|
|
190
|
+
async function testPromptRemote(options) {
|
|
191
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
192
|
+
const input = {
|
|
193
|
+
prompt: options.prompt,
|
|
194
|
+
workspaceId: (0, workforce_common_1.resolveWorkspaceId)(options.targetOrg),
|
|
195
|
+
};
|
|
196
|
+
if (options.temperature !== undefined)
|
|
197
|
+
input.temperature = options.temperature;
|
|
198
|
+
if (options.modelId !== undefined)
|
|
199
|
+
input.modelId = options.modelId;
|
|
200
|
+
if (options.modelProvider !== undefined)
|
|
201
|
+
input.modelProvider = options.modelProvider;
|
|
202
|
+
const data = await client.graphql(AI_TEST_PROMPT, { input });
|
|
203
|
+
return data.aiTestPrompt;
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=workforce-config-remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workforce-config-remote.js","sourceRoot":"","sources":["../../../../src/services/workforce-config-remote.ts"],"names":[],"mappings":";;AA4CA,8DASC;AAED,gEAWC;AAED,sDAQC;AAED,wEAQC;AAkCD,gEAmBC;AAED,gEAkBC;AAED,oEASC;AAED,wEASC;AAED,gEAOC;AA6CD,gEAuBC;AAED,gEAoBC;AAED,oEAUC;AAED,gEAOC;AAED,8DAiBC;AAED,4CAmBC;AArVD,6CAA+C;AAC/C,yDAAwD;AAiBxD,MAAM,oBAAoB,GAAG;;;EAG3B,CAAC;AAEH,MAAM,qBAAqB,GA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I,CAAC,YAAY,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export interface SOPDocumentView {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
category?: string;
|
|
5
|
+
applicableObjects?: string[];
|
|
6
|
+
steps?: unknown;
|
|
7
|
+
status?: string;
|
|
8
|
+
sourceType?: string;
|
|
9
|
+
successRate?: number;
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function createSOPRemote(options: {
|
|
14
|
+
targetOrg: string;
|
|
15
|
+
title: string;
|
|
16
|
+
category?: string;
|
|
17
|
+
applicableObjects?: string[];
|
|
18
|
+
steps?: unknown;
|
|
19
|
+
}): Promise<SOPDocumentView>;
|
|
20
|
+
export declare function updateSOPRemote(options: {
|
|
21
|
+
targetOrg: string;
|
|
22
|
+
id: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
category?: string;
|
|
25
|
+
applicableObjects?: string[];
|
|
26
|
+
steps?: unknown;
|
|
27
|
+
}): Promise<SOPDocumentView>;
|
|
28
|
+
export declare function transitionSOPStatusRemote(options: {
|
|
29
|
+
targetOrg: string;
|
|
30
|
+
id: string;
|
|
31
|
+
targetStatus: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
status: string;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function listSOPRemote(options: {
|
|
38
|
+
targetOrg: string;
|
|
39
|
+
page?: number;
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
status?: string;
|
|
42
|
+
category?: string;
|
|
43
|
+
sourceType?: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
items: SOPDocumentView[];
|
|
46
|
+
total: number;
|
|
47
|
+
page: number;
|
|
48
|
+
pageSize: number;
|
|
49
|
+
}>;
|
|
50
|
+
export declare function getSOPDetailRemote(options: {
|
|
51
|
+
targetOrg: string;
|
|
52
|
+
id: string;
|
|
53
|
+
}): Promise<SOPDocumentView | null>;
|
|
54
|
+
export declare function getSOPEffectivenessRemote(options: {
|
|
55
|
+
targetOrg: string;
|
|
56
|
+
sopId: string;
|
|
57
|
+
}): Promise<{
|
|
58
|
+
sopId: string;
|
|
59
|
+
totalInvocations?: number;
|
|
60
|
+
successfulInvocations?: number;
|
|
61
|
+
successRate?: number;
|
|
62
|
+
lastInvokedAt?: string;
|
|
63
|
+
}>;
|
|
64
|
+
export interface BehaviorAnalyticsResult {
|
|
65
|
+
topPerformers: Array<{
|
|
66
|
+
userId: string;
|
|
67
|
+
userName?: string;
|
|
68
|
+
outcomeCount: number;
|
|
69
|
+
conversionRate: number;
|
|
70
|
+
behaviorCount: number;
|
|
71
|
+
}>;
|
|
72
|
+
totalBehaviors?: number;
|
|
73
|
+
totalOutcomes?: number;
|
|
74
|
+
avgConversionRate?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function getBehaviorAnalyticsRemote(options: {
|
|
77
|
+
targetOrg: string;
|
|
78
|
+
topN?: number;
|
|
79
|
+
}): Promise<BehaviorAnalyticsResult>;
|
|
80
|
+
export interface AgentKnowledgeLinkView {
|
|
81
|
+
id: string;
|
|
82
|
+
workspaceId?: string;
|
|
83
|
+
agentId: string;
|
|
84
|
+
knowledgeScope?: string;
|
|
85
|
+
categories?: string[];
|
|
86
|
+
chunkIds?: string[];
|
|
87
|
+
sopOnly?: boolean;
|
|
88
|
+
maxChunksPerQuery?: number;
|
|
89
|
+
minSimilarity?: number;
|
|
90
|
+
}
|
|
91
|
+
export declare function createKnowledgeLinkRemote(options: {
|
|
92
|
+
targetOrg: string;
|
|
93
|
+
agentId: string;
|
|
94
|
+
knowledgeScope?: string;
|
|
95
|
+
categories?: string[];
|
|
96
|
+
chunkIds?: string[];
|
|
97
|
+
sopOnly?: boolean;
|
|
98
|
+
maxChunksPerQuery?: number;
|
|
99
|
+
minSimilarity?: number;
|
|
100
|
+
}): Promise<AgentKnowledgeLinkView>;
|
|
101
|
+
export declare function updateKnowledgeLinkRemote(options: {
|
|
102
|
+
targetOrg: string;
|
|
103
|
+
id: string;
|
|
104
|
+
knowledgeScope?: string;
|
|
105
|
+
categories?: string[];
|
|
106
|
+
chunkIds?: string[];
|
|
107
|
+
sopOnly?: boolean;
|
|
108
|
+
maxChunksPerQuery?: number;
|
|
109
|
+
minSimilarity?: number;
|
|
110
|
+
}): Promise<AgentKnowledgeLinkView>;
|
|
111
|
+
export declare function deleteKnowledgeLinkRemote(options: {
|
|
112
|
+
targetOrg: string;
|
|
113
|
+
id: string;
|
|
114
|
+
}): Promise<boolean>;
|
|
115
|
+
export declare function getKnowledgeLinkRemote(options: {
|
|
116
|
+
targetOrg: string;
|
|
117
|
+
agentId: string;
|
|
118
|
+
}): Promise<AgentKnowledgeLinkView | null>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSOPRemote = createSOPRemote;
|
|
4
|
+
exports.updateSOPRemote = updateSOPRemote;
|
|
5
|
+
exports.transitionSOPStatusRemote = transitionSOPStatusRemote;
|
|
6
|
+
exports.listSOPRemote = listSOPRemote;
|
|
7
|
+
exports.getSOPDetailRemote = getSOPDetailRemote;
|
|
8
|
+
exports.getSOPEffectivenessRemote = getSOPEffectivenessRemote;
|
|
9
|
+
exports.getBehaviorAnalyticsRemote = getBehaviorAnalyticsRemote;
|
|
10
|
+
exports.createKnowledgeLinkRemote = createKnowledgeLinkRemote;
|
|
11
|
+
exports.updateKnowledgeLinkRemote = updateKnowledgeLinkRemote;
|
|
12
|
+
exports.deleteKnowledgeLinkRemote = deleteKnowledgeLinkRemote;
|
|
13
|
+
exports.getKnowledgeLinkRemote = getKnowledgeLinkRemote;
|
|
14
|
+
const api_client_1 = require("./api-client");
|
|
15
|
+
const workforce_common_1 = require("./workforce-common");
|
|
16
|
+
const CREATE_SOP = `
|
|
17
|
+
mutation CreateSOPDocument($input: CreateSOPDocumentInput!) {
|
|
18
|
+
createSOPDocument(input: $input) { id title category applicableObjects steps status sourceType successRate createdAt updatedAt }
|
|
19
|
+
}`;
|
|
20
|
+
const UPDATE_SOP = `
|
|
21
|
+
mutation UpdateSOPDocument($id: ID!, $input: UpdateSOPDocumentInput!) {
|
|
22
|
+
updateSOPDocument(id: $id, input: $input) { id title category applicableObjects steps status sourceType successRate createdAt updatedAt }
|
|
23
|
+
}`;
|
|
24
|
+
const TRANSITION_SOP = `
|
|
25
|
+
mutation TransitionSOPStatus($id: ID!, $targetStatus: String!) {
|
|
26
|
+
transitionSOPStatus(id: $id, targetStatus: $targetStatus) { id title status }
|
|
27
|
+
}`;
|
|
28
|
+
const LIST_SOP = `
|
|
29
|
+
query SopDocuments($page: Int, $pageSize: Int, $status: String, $category: String, $sourceType: String) {
|
|
30
|
+
sopDocuments(page: $page, pageSize: $pageSize, status: $status, category: $category, sourceType: $sourceType) {
|
|
31
|
+
items { id title category status sourceType successRate createdAt }
|
|
32
|
+
total page pageSize
|
|
33
|
+
}
|
|
34
|
+
}`;
|
|
35
|
+
const SOP_DETAIL = `
|
|
36
|
+
query SopDocumentDetail($id: ID!) {
|
|
37
|
+
sopDocumentDetail(id: $id) { id title category applicableObjects steps status sourceType successRate createdAt updatedAt }
|
|
38
|
+
}`;
|
|
39
|
+
const SOP_EFFECTIVENESS = `
|
|
40
|
+
query SopEffectiveness($sopId: ID!) {
|
|
41
|
+
sopEffectiveness(sopId: $sopId) { sopId totalInvocations successfulInvocations successRate lastInvokedAt }
|
|
42
|
+
}`;
|
|
43
|
+
async function createSOPRemote(options) {
|
|
44
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
45
|
+
const input = { title: options.title };
|
|
46
|
+
if (options.category !== undefined)
|
|
47
|
+
input.category = options.category;
|
|
48
|
+
if (options.applicableObjects !== undefined)
|
|
49
|
+
input.applicableObjects = options.applicableObjects;
|
|
50
|
+
if (options.steps !== undefined)
|
|
51
|
+
input.steps = options.steps;
|
|
52
|
+
const data = await client.graphql(CREATE_SOP, { input });
|
|
53
|
+
return data.createSOPDocument;
|
|
54
|
+
}
|
|
55
|
+
async function updateSOPRemote(options) {
|
|
56
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
57
|
+
const input = {};
|
|
58
|
+
if (options.title !== undefined)
|
|
59
|
+
input.title = options.title;
|
|
60
|
+
if (options.category !== undefined)
|
|
61
|
+
input.category = options.category;
|
|
62
|
+
if (options.applicableObjects !== undefined)
|
|
63
|
+
input.applicableObjects = options.applicableObjects;
|
|
64
|
+
if (options.steps !== undefined)
|
|
65
|
+
input.steps = options.steps;
|
|
66
|
+
const data = await client.graphql(UPDATE_SOP, {
|
|
67
|
+
id: options.id,
|
|
68
|
+
input,
|
|
69
|
+
});
|
|
70
|
+
return data.updateSOPDocument;
|
|
71
|
+
}
|
|
72
|
+
async function transitionSOPStatusRemote(options) {
|
|
73
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
74
|
+
const data = await client.graphql(TRANSITION_SOP, { id: options.id, targetStatus: options.targetStatus });
|
|
75
|
+
return data.transitionSOPStatus;
|
|
76
|
+
}
|
|
77
|
+
async function listSOPRemote(options) {
|
|
78
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
79
|
+
const data = await client.graphql(LIST_SOP, {
|
|
80
|
+
page: options.page,
|
|
81
|
+
pageSize: options.pageSize,
|
|
82
|
+
status: options.status,
|
|
83
|
+
category: options.category,
|
|
84
|
+
sourceType: options.sourceType,
|
|
85
|
+
});
|
|
86
|
+
return data.sopDocuments;
|
|
87
|
+
}
|
|
88
|
+
async function getSOPDetailRemote(options) {
|
|
89
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
90
|
+
const data = await client.graphql(SOP_DETAIL, {
|
|
91
|
+
id: options.id,
|
|
92
|
+
});
|
|
93
|
+
return data.sopDocumentDetail;
|
|
94
|
+
}
|
|
95
|
+
async function getSOPEffectivenessRemote(options) {
|
|
96
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
97
|
+
const data = await client.graphql(SOP_EFFECTIVENESS, { sopId: options.sopId });
|
|
98
|
+
return data.sopEffectiveness;
|
|
99
|
+
}
|
|
100
|
+
const BEHAVIOR_ANALYTICS = `
|
|
101
|
+
query BehaviorAnalytics($topN: Int) {
|
|
102
|
+
behaviorAnalytics(topN: $topN) {
|
|
103
|
+
topPerformers { userId userName outcomeCount conversionRate behaviorCount }
|
|
104
|
+
totalBehaviors totalOutcomes avgConversionRate
|
|
105
|
+
}
|
|
106
|
+
}`;
|
|
107
|
+
async function getBehaviorAnalyticsRemote(options) {
|
|
108
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
109
|
+
const data = await client.graphql(BEHAVIOR_ANALYTICS, { topN: options.topN });
|
|
110
|
+
return data.behaviorAnalytics;
|
|
111
|
+
}
|
|
112
|
+
const CREATE_LINK = `
|
|
113
|
+
mutation CreateAgentKnowledgeLink(
|
|
114
|
+
$workspaceId: String!, $agentId: String!, $knowledgeScope: String, $categories: [String], $chunkIds: [String], $sopOnly: Boolean, $maxChunksPerQuery: Int, $minSimilarity: Float
|
|
115
|
+
) {
|
|
116
|
+
createAgentKnowledgeLink(workspaceId: $workspaceId, agentId: $agentId, knowledgeScope: $knowledgeScope, categories: $categories, chunkIds: $chunkIds, sopOnly: $sopOnly, maxChunksPerQuery: $maxChunksPerQuery, minSimilarity: $minSimilarity) {
|
|
117
|
+
id workspaceId agentId knowledgeScope categories chunkIds sopOnly maxChunksPerQuery minSimilarity
|
|
118
|
+
}
|
|
119
|
+
}`;
|
|
120
|
+
const UPDATE_LINK = `
|
|
121
|
+
mutation UpdateAgentKnowledgeLink($id: String!, $knowledgeScope: String, $categories: [String], $chunkIds: [String], $sopOnly: Boolean, $maxChunksPerQuery: Int, $minSimilarity: Float) {
|
|
122
|
+
updateAgentKnowledgeLink(id: $id, knowledgeScope: $knowledgeScope, categories: $categories, chunkIds: $chunkIds, sopOnly: $sopOnly, maxChunksPerQuery: $maxChunksPerQuery, minSimilarity: $minSimilarity) {
|
|
123
|
+
id workspaceId agentId knowledgeScope categories chunkIds sopOnly maxChunksPerQuery minSimilarity
|
|
124
|
+
}
|
|
125
|
+
}`;
|
|
126
|
+
const DELETE_LINK = `
|
|
127
|
+
mutation DeleteAgentKnowledgeLink($id: String!) { deleteAgentKnowledgeLink(id: $id) }`;
|
|
128
|
+
const GET_LINK = `
|
|
129
|
+
query AgentKnowledgeLink($agentId: String!) {
|
|
130
|
+
agentKnowledgeLink(agentId: $agentId) { id workspaceId agentId knowledgeScope categories chunkIds sopOnly maxChunksPerQuery minSimilarity }
|
|
131
|
+
}`;
|
|
132
|
+
async function createKnowledgeLinkRemote(options) {
|
|
133
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
134
|
+
const data = await client.graphql(CREATE_LINK, {
|
|
135
|
+
workspaceId: (0, workforce_common_1.resolveWorkspaceId)(options.targetOrg),
|
|
136
|
+
agentId: options.agentId,
|
|
137
|
+
knowledgeScope: options.knowledgeScope,
|
|
138
|
+
categories: options.categories,
|
|
139
|
+
chunkIds: options.chunkIds,
|
|
140
|
+
sopOnly: options.sopOnly,
|
|
141
|
+
maxChunksPerQuery: options.maxChunksPerQuery,
|
|
142
|
+
minSimilarity: options.minSimilarity,
|
|
143
|
+
});
|
|
144
|
+
return data.createAgentKnowledgeLink;
|
|
145
|
+
}
|
|
146
|
+
async function updateKnowledgeLinkRemote(options) {
|
|
147
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
148
|
+
const data = await client.graphql(UPDATE_LINK, {
|
|
149
|
+
id: options.id,
|
|
150
|
+
knowledgeScope: options.knowledgeScope,
|
|
151
|
+
categories: options.categories,
|
|
152
|
+
chunkIds: options.chunkIds,
|
|
153
|
+
sopOnly: options.sopOnly,
|
|
154
|
+
maxChunksPerQuery: options.maxChunksPerQuery,
|
|
155
|
+
minSimilarity: options.minSimilarity,
|
|
156
|
+
});
|
|
157
|
+
return data.updateAgentKnowledgeLink;
|
|
158
|
+
}
|
|
159
|
+
async function deleteKnowledgeLinkRemote(options) {
|
|
160
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
161
|
+
const data = await client.graphql(DELETE_LINK, { id: options.id });
|
|
162
|
+
return data;
|
|
163
|
+
}
|
|
164
|
+
async function getKnowledgeLinkRemote(options) {
|
|
165
|
+
const client = (0, api_client_1.createApiClient)(options.targetOrg);
|
|
166
|
+
const data = await client.graphql(GET_LINK, {
|
|
167
|
+
agentId: options.agentId,
|
|
168
|
+
});
|
|
169
|
+
return data.agentKnowledgeLink;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=workforce-distillation-remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workforce-distillation-remote.js","sourceRoot":"","sources":["../../../../src/services/workforce-distillation-remote.ts"],"names":[],"mappings":";;AAqEA,0CAcC;AAED,0CAmBC;AAED,8DAUC;AAED,sCAmBC;AAED,gDASC;AAED,8DAqBC;AAyBD,gEAUC;AAwCD,8DAyBC;AAED,8DAwBC;AAED,8DAOC;AAED,wDASC;AA7TD,6CAA+C;AAC/C,yDAAwD;AAsBxD,MAAM,UAAU,GAAG;;;EAGjB,CAAC;AAEH,MAAM,UAAU,GAAG;;;EAGjB,CAAC;AAEH,MAAM,cAAc,GAAG;;;EAGrB,CAAC;AAEH,MAAM,QAAQ,GAAG;;;;;;EAMf,CAAC;AAEH,MAAM,UAAU,GAAG;;;EAGjB,CAAC;AAEH,MAAM,iBAAiB,GAAG;;;EAGxB,CAAC;AAeI,KAAK,UAAU,eAAe,CAAC,OAMrC;IACC,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,KAAK,GAA4B,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAChE,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;QAAE,K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EAAE,EAAE,OAAO,CAAC,EAAE;QACd,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CACF,CAAC;IACF,OAAO,IAAI,CAAC,wBAAwB,CAAC;AACvC,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAAC,OAG/C;IACC,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAU,WAAW,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5E,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,sBAAsB,CAAC,OAG5C;IACC,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAwD,QAAQ,EAAE;QACjG,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,kBAAkB,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export interface GuardrailRuleView {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
conditions: unknown;
|
|
6
|
+
riskLevel: string;
|
|
7
|
+
action: unknown;
|
|
8
|
+
priority: number;
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function createGuardrailRemote(options: {
|
|
13
|
+
targetOrg: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
conditions: unknown;
|
|
17
|
+
riskLevel: string;
|
|
18
|
+
action: unknown;
|
|
19
|
+
priority?: number;
|
|
20
|
+
}): Promise<GuardrailRuleView>;
|
|
21
|
+
export declare function updateGuardrailRemote(options: {
|
|
22
|
+
targetOrg: string;
|
|
23
|
+
id: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
conditions?: unknown;
|
|
27
|
+
riskLevel?: string;
|
|
28
|
+
action?: unknown;
|
|
29
|
+
priority?: number;
|
|
30
|
+
}): Promise<GuardrailRuleView>;
|
|
31
|
+
export declare function deleteGuardrailRemote(options: {
|
|
32
|
+
targetOrg: string;
|
|
33
|
+
id: string;
|
|
34
|
+
}): Promise<boolean>;
|
|
35
|
+
export declare function toggleGuardrailRemote(options: {
|
|
36
|
+
targetOrg: string;
|
|
37
|
+
id: string;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
isActive: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function reorderGuardrailsRemote(options: {
|
|
44
|
+
targetOrg: string;
|
|
45
|
+
orderedIds: string[];
|
|
46
|
+
}): Promise<boolean>;
|
|
47
|
+
export interface IngestResult {
|
|
48
|
+
documentTitle: string;
|
|
49
|
+
totalChunks: number;
|
|
50
|
+
embeddedChunks: number;
|
|
51
|
+
failedChunks: number;
|
|
52
|
+
chunkIds: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface KnowledgeChunkView {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
content: string;
|
|
58
|
+
contentType?: string;
|
|
59
|
+
sourceType?: string;
|
|
60
|
+
accessLevel?: string;
|
|
61
|
+
createdAt?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function createKnowledgeChunkRemote(options: {
|
|
64
|
+
targetOrg: string;
|
|
65
|
+
title: string;
|
|
66
|
+
content: string;
|
|
67
|
+
contentType?: string;
|
|
68
|
+
sourceType?: string;
|
|
69
|
+
sourceObject?: string;
|
|
70
|
+
sourceRecordId?: string;
|
|
71
|
+
orgNodeId?: string;
|
|
72
|
+
accessLevel?: string;
|
|
73
|
+
metadata?: unknown;
|
|
74
|
+
}): Promise<KnowledgeChunkView>;
|
|
75
|
+
export declare function ingestDocumentRemote(options: {
|
|
76
|
+
targetOrg: string;
|
|
77
|
+
title: string;
|
|
78
|
+
content: string;
|
|
79
|
+
sourceType?: string;
|
|
80
|
+
sourceObject?: string;
|
|
81
|
+
sourceRecordId?: string;
|
|
82
|
+
orgNodeId?: string;
|
|
83
|
+
accessLevel?: string;
|
|
84
|
+
metadata?: unknown;
|
|
85
|
+
}): Promise<IngestResult>;
|
|
86
|
+
export declare function ingestKnowledgeFileRemote(options: {
|
|
87
|
+
targetOrg: string;
|
|
88
|
+
fileName: string;
|
|
89
|
+
contentBase64: string;
|
|
90
|
+
accessLevel?: string;
|
|
91
|
+
orgNodeId?: string;
|
|
92
|
+
}): Promise<IngestResult>;
|
|
93
|
+
export declare function ingestKnowledgeUrlRemote(options: {
|
|
94
|
+
targetOrg: string;
|
|
95
|
+
url: string;
|
|
96
|
+
title?: string;
|
|
97
|
+
accessLevel?: string;
|
|
98
|
+
}): Promise<IngestResult>;
|
|
99
|
+
export declare function deleteKnowledgeDocumentRemote(options: {
|
|
100
|
+
targetOrg: string;
|
|
101
|
+
sourceRecordId: string;
|
|
102
|
+
}): Promise<number>;
|
|
103
|
+
export declare function reembedFailedChunksRemote(options: {
|
|
104
|
+
targetOrg: string;
|
|
105
|
+
}): Promise<number>;
|