@nexusclawhq/cli 0.3.52 → 0.3.54

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.
Files changed (74) hide show
  1. package/dist/build-info.json +4 -4
  2. package/dist/nexus-cli/src/cli.js +1 -1
  3. package/dist/nexus-cli/src/cli.js.map +1 -1
  4. package/dist/nexus-cli/src/runtime/failure-normalizer.d.ts +1 -0
  5. package/dist/nexus-cli/src/runtime/failure-normalizer.js +46 -3
  6. package/dist/nexus-cli/src/runtime/failure-normalizer.js.map +1 -1
  7. package/dist/nexus-cli/src/runtime/failure-normalizer.test.js +15 -0
  8. package/dist/nexus-cli/src/runtime/failure-normalizer.test.js.map +1 -1
  9. package/dist/nexus-cli/src/services/workforce-bundle-remote.d.ts +1 -1
  10. package/dist/nexus-cli/src/services/workforce-observe-remote.d.ts +2 -0
  11. package/dist/nexus-cli/src/services/workforce-observe-remote.execution-detail.test.d.ts +1 -0
  12. package/dist/nexus-cli/src/services/workforce-observe-remote.execution-detail.test.js +12 -0
  13. package/dist/nexus-cli/src/services/workforce-observe-remote.execution-detail.test.js.map +1 -0
  14. package/dist/nexus-cli/src/services/workforce-observe-remote.js +4 -4
  15. package/dist/nexus-cli/src/services/workforce-observe-remote.js.map +1 -1
  16. package/dist/nexus-cli/src/services/workforce-test-remote.d.ts +1 -1
  17. package/dist/nexus-cli/src/services/workforce-test-remote.js +1 -1
  18. package/dist/nexus-cli/src/services/workforce-test-remote.test.js +2 -2
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +1 -1
  21. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.d.ts +0 -38
  22. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.js +0 -502
  23. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.schemas.js.map +0 -1
  24. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.d.ts +0 -191
  25. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.js +0 -3
  26. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/cognitive-policy.types.js.map +0 -1
  27. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.d.ts +0 -4
  28. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.js +0 -53
  29. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.schemas.js.map +0 -1
  30. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.d.ts +0 -37
  31. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.js +0 -3
  32. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/context-selection.types.js.map +0 -1
  33. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.d.ts +0 -19
  34. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.js +0 -42
  35. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/contract-versions.js.map +0 -1
  36. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.d.ts +0 -12
  37. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.js +0 -161
  38. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.schemas.js.map +0 -1
  39. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.d.ts +0 -44
  40. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.js +0 -3
  41. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/controlled-memory.types.js.map +0 -1
  42. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.d.ts +0 -5
  43. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.js +0 -81
  44. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.schemas.js.map +0 -1
  45. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.d.ts +0 -61
  46. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.js +0 -3
  47. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/goal-snapshot.types.js.map +0 -1
  48. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.d.ts +0 -15
  49. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.js +0 -32
  50. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/index.js.map +0 -1
  51. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.d.ts +0 -9
  52. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.js +0 -170
  53. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.schemas.js.map +0 -1
  54. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.d.ts +0 -98
  55. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.js +0 -3
  56. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/proactive-decision.types.js.map +0 -1
  57. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.d.ts +0 -21
  58. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.js +0 -157
  59. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.schemas.js.map +0 -1
  60. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.d.ts +0 -47
  61. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.js +0 -3
  62. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/success-evaluation.types.js.map +0 -1
  63. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.d.ts +0 -19
  64. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.js +0 -177
  65. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.schemas.js.map +0 -1
  66. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.d.ts +0 -66
  67. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.js +0 -3
  68. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-cognition/training-evidence.types.js.map +0 -1
  69. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.d.ts +0 -53
  70. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.js +0 -42
  71. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-employee-runtime/index.js.map +0 -1
  72. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.d.ts +0 -743
  73. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.js +0 -1261
  74. package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/ai-workforce-learning/index.js.map +0 -1
@@ -1,191 +0,0 @@
1
- import type { Sha256Digest } from '../agent-executable-assets/canonical-hash';
2
- import type { ProactiveWakeSignalV1 } from './proactive-decision.types';
3
- export interface VersionedRefV1 {
4
- id: string;
5
- version: string;
6
- digest: Sha256Digest;
7
- }
8
- export type TypedEvidenceKindV1 = 'outcome_event' | 'agent_execution' | 'react_step' | 'tool_call' | 'agent_test_result' | 'approval' | 'human_review' | 'record_version' | 'metering_record' | 'content_version';
9
- export interface TypedEvidenceRefV1 {
10
- kind: TypedEvidenceKindV1;
11
- id: string;
12
- version?: string;
13
- digest?: Sha256Digest;
14
- observedAt: string;
15
- }
16
- export type SuccessCriterionKindV1 = 'hard_constraint' | 'safety' | 'business_outcome' | 'deliverable_quality' | 'process_compliance' | 'human_effort' | 'cost' | 'latency' | 'stability' | 'evidence_quality';
17
- export interface SuccessCriterionV1 {
18
- code: string;
19
- kind: SuccessCriterionKindV1;
20
- phase: 'leading' | 'lagging';
21
- hardGate: boolean;
22
- direction: 'maximize' | 'minimize' | 'target' | 'within_range';
23
- target: {
24
- value?: number;
25
- min?: number;
26
- max?: number;
27
- unit: string;
28
- };
29
- softWeight?: number;
30
- baseline: {
31
- sourceKey: string;
32
- window: string;
33
- };
34
- observationWindow: string;
35
- attributionWindow: string;
36
- evaluator: {
37
- evaluatorKey: string;
38
- version: string;
39
- owner: string;
40
- };
41
- evidence: {
42
- requiredKinds: TypedEvidenceKindV1[];
43
- minimumSampleSize: number;
44
- missingPolicy: 'pending' | 'fail_closed' | 'human_review';
45
- };
46
- }
47
- export interface EmployeeSuccessContractV1 {
48
- schemaVersion: 'employee-success-contract/v1';
49
- contractId: string;
50
- contractRevision: string;
51
- mission: string;
52
- stakeholders: Array<{
53
- code: string;
54
- role: string;
55
- }>;
56
- scope: {
57
- included: string[];
58
- excluded: string[];
59
- };
60
- criteria: SuccessCriterionV1[];
61
- budgets: {
62
- maxHumanInterventions?: number;
63
- maxLatencyMs?: number;
64
- maxInputTokens?: number;
65
- maxOutputTokens?: number;
66
- maxCostMinorUnits?: number;
67
- };
68
- conflictPolicy: 'hard_gate_wins' | 'human_review';
69
- reviewPolicy: {
70
- requiredForFinal: boolean;
71
- reviewerCapability?: string;
72
- };
73
- rollbackCriteria: Array<{
74
- metricCode: string;
75
- comparator: 'lt' | 'lte' | 'gt' | 'gte';
76
- threshold: number;
77
- minimumSampleSize: number;
78
- }>;
79
- digest: Sha256Digest;
80
- }
81
- export interface ContextPolicyV1 {
82
- schemaVersion: 'context-policy/v1';
83
- totalInputTokenBudget: number;
84
- sourceBudgets: {
85
- worldState: number;
86
- publishedKnowledgeAndSop: number;
87
- controlledMemory: number;
88
- verifiedExemplars: number;
89
- };
90
- minimumMemoryTrust: number;
91
- maximumLegacyMemoryTokens: number;
92
- conflictPolicy: 'live_state_wins_and_record' | 'exclude_and_review';
93
- tokenizerPolicyVersion: string;
94
- }
95
- export type MemoryCategoryV1 = 'customer_fact' | 'customer_preference' | 'commitment' | 'risk_signal' | 'episodic_summary';
96
- export interface MemoryPolicyV1 {
97
- schemaVersion: 'memory-policy/v1';
98
- enabled: boolean;
99
- allowedCategories: MemoryCategoryV1[];
100
- activationMode: 'human_review' | 'narrow_policy_approval';
101
- minimumConfidence: number;
102
- requireFinalEvaluation: boolean;
103
- defaultTtlDays: number;
104
- maximumTtlDays: number;
105
- allowLegacyReadThrough: boolean;
106
- restrictedSensitivityRequiresHuman: true;
107
- }
108
- /**
109
- * The four autonomy modes an AI employee's proactive policy may declare.
110
- *
111
- * - `A0_disabled` — no proactive behavior (also the only legal value for a
112
- * legacy agent with no success contract, and for any candidate whose
113
- * cognitive policy has not yet been promoted to the active release head).
114
- * - `A1_recommend` / `A2_confirm` — P0 proactive reach.
115
- * - `A3_bounded_execute` — P0+ only; runtime feature gate must reject it
116
- * until Phase 12 release-gate evidence is complete.
117
- *
118
- * This alias is the single source of truth shared by `ProactivePolicyV1.mode`
119
- * and by the cognitive-policy read model's `effectiveAutonomy` projection.
120
- * The read model derives `effectiveAutonomy` from the release-head-pinned
121
- * AgentVersion's `proactivePolicy.mode`; it is never a second activation path
122
- * (design.md §3.2 / §11.3: autonomy activates only with the full workforce
123
- * release head CAS).
124
- */
125
- export type EffectiveAutonomyV1 = 'A0_disabled' | 'A1_recommend' | 'A2_confirm' | 'A3_bounded_execute';
126
- export interface ProactivePolicyV1 {
127
- schemaVersion: 'proactive-policy/v1';
128
- mode: EffectiveAutonomyV1;
129
- allowedWakeSources: ProactiveWakeSignalV1['source'][];
130
- actionAllowlist: Array<{
131
- kind: 'tool';
132
- toolName: string;
133
- } | {
134
- kind: 'flow';
135
- canonicalKey: string;
136
- }>;
137
- maximumEffectiveRisk: 'L0' | 'L1';
138
- budgetPolicyRef: string;
139
- narrowingCaps: {
140
- wakesPerDay: number;
141
- assessmentsPerDay: number;
142
- proposalsPerDay: number;
143
- autonomousExecutionsPerDay: number;
144
- costMinorUnitsPerDay: number;
145
- contactsPerRecordPerDay: number;
146
- maxOpenProposals: number;
147
- };
148
- cooldownSeconds: number;
149
- quietHours?: {
150
- start: string;
151
- end: string;
152
- timezone: string;
153
- };
154
- maxCausalDepth: 0 | 1;
155
- minimumExpectedValue: number;
156
- minimumConfidence: number;
157
- maximumUncertainty: number;
158
- }
159
- export interface CriticPolicyV1 {
160
- schemaVersion: 'critic-policy/v1';
161
- deterministicPolicyVersion: string;
162
- modelPolicyKey?: string;
163
- outputSchemaVersion: string;
164
- rolloutMode: 'deterministic_only' | 'shadow' | 'rank_advisory';
165
- maximumCandidates: number;
166
- budgetPolicyRef: string;
167
- lowConfidenceDisposition: 'observe' | 'recommend' | 'handoff';
168
- }
169
- export interface AgentCognitivePolicyV1 {
170
- schemaVersion: 'agent-cognitive-policy/v1';
171
- successContract: EmployeeSuccessContractV1;
172
- contextPolicy: ContextPolicyV1;
173
- memoryPolicy: MemoryPolicyV1;
174
- proactivePolicy: ProactivePolicyV1;
175
- criticPolicy: CriticPolicyV1;
176
- digest: Sha256Digest;
177
- }
178
- /**
179
- * Minimal immutable stamp carried by the existing `item_kind=agent` release
180
- * item. It is not an alternate definition snapshot or release pointer.
181
- */
182
- export interface AgentCognitiveReleaseLockV1 {
183
- schemaVersion: 'agent-cognitive-release-lock/v1';
184
- cognitivePolicyDigest: Sha256Digest;
185
- successContractId: string;
186
- successContractDigest: Sha256Digest;
187
- }
188
- export type LegacyCognitivePolicyStateV1 = {
189
- status: 'legacy_no_success_contract';
190
- effectiveAutonomy: 'A0_disabled';
191
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=cognitive-policy.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cognitive-policy.types.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/cognitive-policy.types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { RuntimeContextSelectionManifestV1 } from './context-selection.types';
2
- import { type CognitionValidationResultV1 } from './cognitive-policy.schemas';
3
- export declare const CONTEXT_INJECTION_ORDER: readonly ["constitution", "principal", "success_contract", "goal_snapshot", "world_state", "published_knowledge_and_sop", "controlled_memory", "verified_exemplars", "tools_budgets_schema", "untrusted_current_content"];
4
- export declare function validateContextSelectionManifest(value: unknown): CognitionValidationResultV1<RuntimeContextSelectionManifestV1>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONTEXT_INJECTION_ORDER = void 0;
4
- exports.validateContextSelectionManifest = validateContextSelectionManifest;
5
- const cognitive_policy_schemas_1 = require("./cognitive-policy.schemas");
6
- exports.CONTEXT_INJECTION_ORDER = [
7
- 'constitution',
8
- 'principal',
9
- 'success_contract',
10
- 'goal_snapshot',
11
- 'world_state',
12
- 'published_knowledge_and_sop',
13
- 'controlled_memory',
14
- 'verified_exemplars',
15
- 'tools_budgets_schema',
16
- 'untrusted_current_content',
17
- ];
18
- function validateContextSelectionManifest(value) {
19
- const issues = (0, cognitive_policy_schemas_1.findForbiddenCognitionPayload)(value);
20
- const manifest = value;
21
- if (!manifest ||
22
- manifest.schemaVersion !== 'runtime-context-selection-manifest/v1' ||
23
- !manifest.executionId ||
24
- !Number.isInteger(manifest.modelCallOrdinal) ||
25
- !Array.isArray(manifest.selected) ||
26
- !Array.isArray(manifest.rejected)) {
27
- issues.push({
28
- code: 'CONTEXT_MANIFEST_INVALID',
29
- jsonPath: '/',
30
- message: 'Manifest identity, ordinal, selected, and rejected are required',
31
- });
32
- }
33
- for (const [index, item] of (manifest?.selected ?? []).entries()) {
34
- if (item.permissionDecision === 'denied') {
35
- issues.push({
36
- code: 'CONTEXT_SOURCE_FORBIDDEN',
37
- jsonPath: `/selected/${index}`,
38
- message: 'Denied items cannot be selected',
39
- });
40
- }
41
- if (item.tokenCount < 0) {
42
- issues.push({
43
- code: 'CONTEXT_BUDGET_EXCEEDED',
44
- jsonPath: `/selected/${index}/tokenCount`,
45
- message: 'Token count cannot be negative',
46
- });
47
- }
48
- }
49
- return issues.length
50
- ? { valid: false, issues }
51
- : { valid: true, value: value, issues };
52
- }
53
- //# sourceMappingURL=context-selection.schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-selection.schemas.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/context-selection.schemas.ts"],"names":[],"mappings":";;;AAmBA,4EAsCC;AAxDD,yEAGoC;AAEvB,QAAA,uBAAuB,GAAG;IACrC,cAAc;IACd,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,6BAA6B;IAC7B,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,2BAA2B;CACnB,CAAC;AAEX,SAAgB,gCAAgC,CAC9C,KAAc;IAEd,MAAM,MAAM,GAAG,IAAA,wDAA6B,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,KAA0D,CAAC;IAC5E,IACE,CAAC,QAAQ;QACT,QAAQ,CAAC,aAAa,KAAK,uCAAuC;QAClE,CAAC,QAAQ,CAAC,WAAW;QACrB,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC5C,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACjC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACjC,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,0BAA0B;YAChC,QAAQ,EAAE,GAAG;YACb,OAAO,EAAE,iEAAiE;SAC3E,CAAC,CAAC;IACL,CAAC;IACD,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACjE,IAAI,IAAI,CAAC,kBAAkB,KAAK,QAAQ,EAAE,CAAC;YACzC,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,aAAa,KAAK,EAAE;gBAC9B,OAAO,EAAE,iCAAiC;aAC3C,CAAC,CAAC;QACL,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,yBAAyB;gBAC/B,QAAQ,EAAE,aAAa,KAAK,aAAa;gBACzC,OAAO,EAAE,gCAAgC;aAC1C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM;QAClB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;QAC1B,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAA0C,EAAE,MAAM,EAAE,CAAC;AACjF,CAAC"}
@@ -1,37 +0,0 @@
1
- import type { Sha256Digest } from '../agent-executable-assets/canonical-hash';
2
- export type ContextSourceKindV1 = 'world_state' | 'sop' | 'knowledge' | 'memory' | 'exemplar' | 'user' | 'tool';
3
- export interface ContextSelectionItemV1 {
4
- sourceKind: ContextSourceKindV1;
5
- sourceId: string;
6
- revision?: string;
7
- sourceDigest: Sha256Digest;
8
- permissionDecision: 'allowed' | 'denied' | 'redacted';
9
- trust: 'governed' | 'verified' | 'untrusted' | 'legacy_unverified';
10
- relevance: number;
11
- recency: number;
12
- conflictScore: number;
13
- reasonCode: string;
14
- expiresAt?: string;
15
- tokenCount: number;
16
- truncated: boolean;
17
- }
18
- export interface RuntimeContextSelectionManifestV1 {
19
- schemaVersion: 'runtime-context-selection-manifest/v1';
20
- manifestId: string;
21
- executionId: string;
22
- reactStepId?: string;
23
- modelCallOrdinal: number;
24
- goalSnapshotDigest: Sha256Digest;
25
- contextPolicyDigest: Sha256Digest;
26
- selected: ContextSelectionItemV1[];
27
- rejected: ContextSelectionItemV1[];
28
- tokenBudget: {
29
- requested: number;
30
- selected: number;
31
- truncated: number;
32
- };
33
- injectionOrder: string[];
34
- renderedInputDigest: Sha256Digest;
35
- createdAt: string;
36
- digest: Sha256Digest;
37
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=context-selection.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-selection.types.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/context-selection.types.ts"],"names":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- export declare const EMPLOYEE_SUCCESS_CONTRACT_V1: "employee-success-contract/v1";
2
- export declare const AGENT_COGNITIVE_POLICY_V1: "agent-cognitive-policy/v1";
3
- export declare const CONTEXT_POLICY_V1: "context-policy/v1";
4
- export declare const MEMORY_POLICY_V1: "memory-policy/v1";
5
- export declare const PROACTIVE_POLICY_V1: "proactive-policy/v1";
6
- export declare const CRITIC_POLICY_V1: "critic-policy/v1";
7
- export declare const EXECUTION_GOAL_SNAPSHOT_V1: "execution-goal-snapshot/v1";
8
- export declare const COGNITIVE_EXECUTION_INPUT_V1: "cognitive-execution-input/v1";
9
- export declare const RUNTIME_CONTEXT_SELECTION_MANIFEST_V1: "runtime-context-selection-manifest/v1";
10
- export declare const SUCCESS_EVALUATION_RECORD_V1: "success-evaluation-record/v1";
11
- export declare const MEMORY_PROPOSAL_V1: "memory-proposal/v1";
12
- export declare const MEMORY_REVISION_V1: "memory-revision/v1";
13
- export declare const PROACTIVE_WAKE_SIGNAL_V1: "proactive-wake-signal/v1";
14
- export declare const GOAL_GAP_ASSESSMENT_V1: "goal-gap-assessment/v1";
15
- export declare const AGENT_OPPORTUNITY_PROPOSAL_V1: "agent-opportunity-proposal/v1";
16
- export declare const TRAINING_TRAJECTORY_V1: "training-trajectory/v1";
17
- export declare const COGNITIVE_DATASET_MANIFEST_V1: "cognitive-dataset-manifest/v1";
18
- export declare const TEACHER_EVIDENCE_REF_V1: "teacher-evidence-ref/v1";
19
- export declare const COGNITION_SCHEMA_VERSIONS: readonly ["employee-success-contract/v1", "agent-cognitive-policy/v1", "context-policy/v1", "memory-policy/v1", "proactive-policy/v1", "critic-policy/v1", "execution-goal-snapshot/v1", "cognitive-execution-input/v1", "runtime-context-selection-manifest/v1", "success-evaluation-record/v1", "memory-proposal/v1", "memory-revision/v1", "proactive-wake-signal/v1", "goal-gap-assessment/v1", "agent-opportunity-proposal/v1", "training-trajectory/v1", "cognitive-dataset-manifest/v1", "teacher-evidence-ref/v1"];
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COGNITION_SCHEMA_VERSIONS = exports.TEACHER_EVIDENCE_REF_V1 = exports.COGNITIVE_DATASET_MANIFEST_V1 = exports.TRAINING_TRAJECTORY_V1 = exports.AGENT_OPPORTUNITY_PROPOSAL_V1 = exports.GOAL_GAP_ASSESSMENT_V1 = exports.PROACTIVE_WAKE_SIGNAL_V1 = exports.MEMORY_REVISION_V1 = exports.MEMORY_PROPOSAL_V1 = exports.SUCCESS_EVALUATION_RECORD_V1 = exports.RUNTIME_CONTEXT_SELECTION_MANIFEST_V1 = exports.COGNITIVE_EXECUTION_INPUT_V1 = exports.EXECUTION_GOAL_SNAPSHOT_V1 = exports.CRITIC_POLICY_V1 = exports.PROACTIVE_POLICY_V1 = exports.MEMORY_POLICY_V1 = exports.CONTEXT_POLICY_V1 = exports.AGENT_COGNITIVE_POLICY_V1 = exports.EMPLOYEE_SUCCESS_CONTRACT_V1 = void 0;
4
- exports.EMPLOYEE_SUCCESS_CONTRACT_V1 = 'employee-success-contract/v1';
5
- exports.AGENT_COGNITIVE_POLICY_V1 = 'agent-cognitive-policy/v1';
6
- exports.CONTEXT_POLICY_V1 = 'context-policy/v1';
7
- exports.MEMORY_POLICY_V1 = 'memory-policy/v1';
8
- exports.PROACTIVE_POLICY_V1 = 'proactive-policy/v1';
9
- exports.CRITIC_POLICY_V1 = 'critic-policy/v1';
10
- exports.EXECUTION_GOAL_SNAPSHOT_V1 = 'execution-goal-snapshot/v1';
11
- exports.COGNITIVE_EXECUTION_INPUT_V1 = 'cognitive-execution-input/v1';
12
- exports.RUNTIME_CONTEXT_SELECTION_MANIFEST_V1 = 'runtime-context-selection-manifest/v1';
13
- exports.SUCCESS_EVALUATION_RECORD_V1 = 'success-evaluation-record/v1';
14
- exports.MEMORY_PROPOSAL_V1 = 'memory-proposal/v1';
15
- exports.MEMORY_REVISION_V1 = 'memory-revision/v1';
16
- exports.PROACTIVE_WAKE_SIGNAL_V1 = 'proactive-wake-signal/v1';
17
- exports.GOAL_GAP_ASSESSMENT_V1 = 'goal-gap-assessment/v1';
18
- exports.AGENT_OPPORTUNITY_PROPOSAL_V1 = 'agent-opportunity-proposal/v1';
19
- exports.TRAINING_TRAJECTORY_V1 = 'training-trajectory/v1';
20
- exports.COGNITIVE_DATASET_MANIFEST_V1 = 'cognitive-dataset-manifest/v1';
21
- exports.TEACHER_EVIDENCE_REF_V1 = 'teacher-evidence-ref/v1';
22
- exports.COGNITION_SCHEMA_VERSIONS = [
23
- exports.EMPLOYEE_SUCCESS_CONTRACT_V1,
24
- exports.AGENT_COGNITIVE_POLICY_V1,
25
- exports.CONTEXT_POLICY_V1,
26
- exports.MEMORY_POLICY_V1,
27
- exports.PROACTIVE_POLICY_V1,
28
- exports.CRITIC_POLICY_V1,
29
- exports.EXECUTION_GOAL_SNAPSHOT_V1,
30
- exports.COGNITIVE_EXECUTION_INPUT_V1,
31
- exports.RUNTIME_CONTEXT_SELECTION_MANIFEST_V1,
32
- exports.SUCCESS_EVALUATION_RECORD_V1,
33
- exports.MEMORY_PROPOSAL_V1,
34
- exports.MEMORY_REVISION_V1,
35
- exports.PROACTIVE_WAKE_SIGNAL_V1,
36
- exports.GOAL_GAP_ASSESSMENT_V1,
37
- exports.AGENT_OPPORTUNITY_PROPOSAL_V1,
38
- exports.TRAINING_TRAJECTORY_V1,
39
- exports.COGNITIVE_DATASET_MANIFEST_V1,
40
- exports.TEACHER_EVIDENCE_REF_V1,
41
- ];
42
- //# sourceMappingURL=contract-versions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract-versions.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/contract-versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,8BAAuC,CAAC;AACvE,QAAA,yBAAyB,GAAG,2BAAoC,CAAC;AACjE,QAAA,iBAAiB,GAAG,mBAA4B,CAAC;AACjD,QAAA,gBAAgB,GAAG,kBAA2B,CAAC;AAC/C,QAAA,mBAAmB,GAAG,qBAA8B,CAAC;AACrD,QAAA,gBAAgB,GAAG,kBAA2B,CAAC;AAC/C,QAAA,0BAA0B,GAAG,4BAAqC,CAAC;AACnE,QAAA,4BAA4B,GAAG,8BAAuC,CAAC;AACvE,QAAA,qCAAqC,GAChD,uCAAgD,CAAC;AACtC,QAAA,4BAA4B,GAAG,8BAAuC,CAAC;AACvE,QAAA,kBAAkB,GAAG,oBAA6B,CAAC;AACnD,QAAA,kBAAkB,GAAG,oBAA6B,CAAC;AACnD,QAAA,wBAAwB,GAAG,0BAAmC,CAAC;AAC/D,QAAA,sBAAsB,GAAG,wBAAiC,CAAC;AAC3D,QAAA,6BAA6B,GACxC,+BAAwC,CAAC;AAC9B,QAAA,sBAAsB,GAAG,wBAAiC,CAAC;AAC3D,QAAA,6BAA6B,GACxC,+BAAwC,CAAC;AAC9B,QAAA,uBAAuB,GAAG,yBAAkC,CAAC;AAE7D,QAAA,yBAAyB,GAAG;IACvC,oCAA4B;IAC5B,iCAAyB;IACzB,yBAAiB;IACjB,wBAAgB;IAChB,2BAAmB;IACnB,wBAAgB;IAChB,kCAA0B;IAC1B,oCAA4B;IAC5B,6CAAqC;IACrC,oCAA4B;IAC5B,0BAAkB;IAClB,0BAAkB;IAClB,gCAAwB;IACxB,8BAAsB;IACtB,qCAA6B;IAC7B,8BAAsB;IACtB,qCAA6B;IAC7B,+BAAuB;CACf,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { MemoryProposalV1, MemoryRevisionStatusV1, MemoryRevisionV1 } from './controlled-memory.types';
2
- import { type CognitionValidationResultV1 } from './cognitive-policy.schemas';
3
- import type { AnySchemaObject } from 'ajv';
4
- export declare const memoryProposalSchema: AnySchemaObject;
5
- export declare const memoryRevisionSchema: AnySchemaObject;
6
- export declare const MEMORY_REVISION_TRANSITIONS: Readonly<Record<MemoryRevisionStatusV1, readonly MemoryRevisionStatusV1[]>>;
7
- export declare function canTransitionMemoryRevision(from: MemoryRevisionStatusV1, to: MemoryRevisionStatusV1): boolean;
8
- export declare function validateMemoryProposal(value: unknown): CognitionValidationResultV1<MemoryProposalV1>;
9
- export declare function validateMemoryTransition(input: {
10
- previous: MemoryRevisionV1;
11
- next: MemoryRevisionV1;
12
- }): CognitionValidationResultV1<MemoryRevisionV1>;
@@ -1,161 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MEMORY_REVISION_TRANSITIONS = exports.memoryRevisionSchema = exports.memoryProposalSchema = void 0;
4
- exports.canTransitionMemoryRevision = canTransitionMemoryRevision;
5
- exports.validateMemoryProposal = validateMemoryProposal;
6
- exports.validateMemoryTransition = validateMemoryTransition;
7
- const cognitive_policy_schemas_1 = require("./cognitive-policy.schemas");
8
- exports.memoryProposalSchema = {
9
- $schema: 'https://json-schema.org/draft/2020-12/schema',
10
- $id: 'schema://nexusclaw/memory-proposal/v1',
11
- type: 'object',
12
- additionalProperties: false,
13
- required: [
14
- 'schemaVersion',
15
- 'proposalId',
16
- 'workspaceId',
17
- 'agentId',
18
- 'scope',
19
- 'category',
20
- 'redactedContent',
21
- 'sourceEvidence',
22
- 'sourceOutcomeStatus',
23
- 'confidence',
24
- 'sensitivity',
25
- 'validFrom',
26
- 'proposalDigest',
27
- ],
28
- properties: {
29
- schemaVersion: { const: 'memory-proposal/v1' },
30
- proposalId: { type: 'string', minLength: 1 },
31
- workspaceId: { type: 'string', minLength: 1 },
32
- agentId: { type: 'string', minLength: 1 },
33
- scope: { type: 'object', additionalProperties: false },
34
- category: {
35
- enum: [
36
- 'customer_fact',
37
- 'customer_preference',
38
- 'commitment',
39
- 'risk_signal',
40
- 'episodic_summary',
41
- ],
42
- },
43
- redactedContent: { type: 'string', minLength: 1 },
44
- sourceEvidence: { type: 'array', minItems: 1 },
45
- sourceOutcomeStatus: {
46
- enum: ['verified', 'failed', 'pending', 'not_applicable'],
47
- },
48
- confidence: { type: 'number', minimum: 0, maximum: 1 },
49
- sensitivity: { enum: ['normal', 'personal', 'restricted'] },
50
- validFrom: { type: 'string', minLength: 1 },
51
- validUntil: { type: 'string', minLength: 1 },
52
- proposalDigest: { type: 'string' },
53
- },
54
- };
55
- exports.memoryRevisionSchema = {
56
- $schema: 'https://json-schema.org/draft/2020-12/schema',
57
- $id: 'schema://nexusclaw/memory-revision/v1',
58
- type: 'object',
59
- additionalProperties: false,
60
- required: [
61
- 'schemaVersion',
62
- 'memoryItemId',
63
- 'revision',
64
- 'status',
65
- 'proposal',
66
- 'decision',
67
- 'retentionTier',
68
- 'createdAt',
69
- 'digest',
70
- ],
71
- properties: {
72
- schemaVersion: { const: 'memory-revision/v1' },
73
- memoryItemId: { type: 'string', minLength: 1 },
74
- revision: { type: 'integer', minimum: 1 },
75
- status: {
76
- enum: [
77
- 'proposed',
78
- 'active',
79
- 'contradicted',
80
- 'superseded',
81
- 'expired',
82
- 'revoked',
83
- 'archived',
84
- ],
85
- },
86
- proposal: exports.memoryProposalSchema,
87
- decision: { type: 'object' },
88
- supersedesRevisionId: { type: 'string' },
89
- rollbackTargetRevisionId: { type: 'string' },
90
- retentionTier: { type: 'string', minLength: 1 },
91
- createdAt: { type: 'string', minLength: 1 },
92
- digest: { type: 'string' },
93
- },
94
- };
95
- exports.MEMORY_REVISION_TRANSITIONS = {
96
- proposed: ['active', 'archived'],
97
- active: ['contradicted', 'superseded', 'expired', 'revoked'],
98
- contradicted: ['superseded', 'revoked', 'archived'],
99
- superseded: ['archived'],
100
- expired: ['archived'],
101
- revoked: ['archived'],
102
- archived: [],
103
- };
104
- function canTransitionMemoryRevision(from, to) {
105
- return exports.MEMORY_REVISION_TRANSITIONS[from].includes(to);
106
- }
107
- function validateMemoryProposal(value) {
108
- const issues = (0, cognitive_policy_schemas_1.findForbiddenCognitionPayload)(value);
109
- const proposal = value;
110
- if (!proposal ||
111
- proposal.schemaVersion !== 'memory-proposal/v1' ||
112
- !proposal.workspaceId ||
113
- !proposal.agentId ||
114
- !proposal.redactedContent ||
115
- !Array.isArray(proposal.sourceEvidence) ||
116
- proposal.sourceEvidence.length === 0) {
117
- issues.push({
118
- code: 'MEMORY_PROPOSAL_INVALID',
119
- jsonPath: '/',
120
- message: 'Memory proposal identity, redacted content, and evidence are required',
121
- });
122
- }
123
- if (proposal?.category === 'procedure' ||
124
- proposal?.category === 'global_playbook') {
125
- issues.push({
126
- code: 'MEMORY_PROCEDURAL_ASSET_FORBIDDEN',
127
- jsonPath: '/category',
128
- message: 'Procedural assets belong to the governed learning owners',
129
- });
130
- }
131
- return issues.length
132
- ? { valid: false, issues }
133
- : { valid: true, value: value, issues };
134
- }
135
- function validateMemoryTransition(input) {
136
- const issues = (0, cognitive_policy_schemas_1.findForbiddenCognitionPayload)(input.next);
137
- if (input.next.memoryItemId !== input.previous.memoryItemId ||
138
- input.next.revision !== input.previous.revision + 1 ||
139
- !canTransitionMemoryRevision(input.previous.status, input.next.status)) {
140
- issues.push({
141
- code: 'MEMORY_REVISION_CONFLICT',
142
- jsonPath: '/',
143
- message: 'Illegal memory revision transition',
144
- });
145
- }
146
- if (input.previous.status === 'proposed' &&
147
- input.next.status === 'archived' &&
148
- (input.next.decision.mode !== 'human_review' ||
149
- !input.next.decision.actorId ||
150
- !input.next.decision.reasonCode)) {
151
- issues.push({
152
- code: 'MEMORY_REVISION_CONFLICT',
153
- jsonPath: '/decision',
154
- message: 'Human rejection requires actor and reason',
155
- });
156
- }
157
- return issues.length
158
- ? { valid: false, issues }
159
- : { valid: true, value: input.next, issues };
160
- }
161
- //# sourceMappingURL=controlled-memory.schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controlled-memory.schemas.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/controlled-memory.schemas.ts"],"names":[],"mappings":";;;AAgHA,kEAKC;AAED,wDAiCC;AAED,4DAgCC;AArLD,yEAGoC;AAGvB,QAAA,oBAAoB,GAAoB;IACnD,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,uCAAuC;IAC5C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE;QACR,eAAe;QACf,YAAY;QACZ,aAAa;QACb,SAAS;QACT,OAAO;QACP,UAAU;QACV,iBAAiB;QACjB,gBAAgB;QAChB,qBAAqB;QACrB,YAAY;QACZ,aAAa;QACb,WAAW;QACX,gBAAgB;KACjB;IACD,UAAU,EAAE;QACV,aAAa,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE;QAC9C,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;QAC5C,WAAW,EAAE,EA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AAQ,GAAG,CAAC;QACnD,CAAC,2BAA2B,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EACtE,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,0BAA0B;YAChC,QAAQ,EAAE,GAAG;YACb,OAAO,EAAE,oCAAoC;SAC9C,CAAC,CAAC;IACL,CAAC;IACD,IACE,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,UAAU;QAChC,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc;YAC1C,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO;YAC5B,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAClC,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,0BAA0B;YAChC,QAAQ,EAAE,WAAW;YACrB,OAAO,EAAE,2CAA2C;SACrD,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,MAAM;QAClB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;QAC1B,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;AACjD,CAAC"}
@@ -1,44 +0,0 @@
1
- import type { MemoryCategoryV1, TypedEvidenceRefV1 } from './cognitive-policy.types';
2
- import type { Sha256Digest } from '../agent-executable-assets/canonical-hash';
3
- export interface MemoryScopeV1 {
4
- objectName?: string;
5
- recordId?: string;
6
- customerId?: string;
7
- executionId?: string;
8
- }
9
- export interface MemoryProposalV1 {
10
- schemaVersion: 'memory-proposal/v1';
11
- proposalId: string;
12
- workspaceId: string;
13
- agentId: string;
14
- scope: MemoryScopeV1;
15
- category: MemoryCategoryV1;
16
- redactedContent: string;
17
- sourceEvidence: TypedEvidenceRefV1[];
18
- sourceOutcomeStatus: 'verified' | 'failed' | 'pending' | 'not_applicable';
19
- confidence: number;
20
- sensitivity: 'normal' | 'personal' | 'restricted';
21
- validFrom: string;
22
- validUntil?: string;
23
- proposalDigest: Sha256Digest;
24
- }
25
- export type MemoryRevisionStatusV1 = 'proposed' | 'active' | 'contradicted' | 'superseded' | 'expired' | 'revoked' | 'archived';
26
- export interface MemoryRevisionV1 {
27
- schemaVersion: 'memory-revision/v1';
28
- memoryItemId: string;
29
- revision: number;
30
- status: MemoryRevisionStatusV1;
31
- proposal: MemoryProposalV1;
32
- decision: {
33
- mode: 'human_review' | 'policy_approved' | 'system_expiry' | 'conflict_resolution' | 'rollback';
34
- actorId?: string;
35
- policyDigest?: Sha256Digest;
36
- reasonCode: string;
37
- };
38
- supersedesRevisionId?: string;
39
- rollbackTargetRevisionId?: string;
40
- retentionTier: string;
41
- createdAt: string;
42
- digest: Sha256Digest;
43
- }
44
- export type LegacyMigrationStatusV1 = 'not_applicable' | 'observing' | 'read_through_enabled' | 'writes_stopped' | 'backfill_in_progress' | 'migration_complete' | 'read_through_disabled' | 'blocked';
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=controlled-memory.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controlled-memory.types.js","sourceRoot":"","sources":["../../src/ai-employee-cognition/controlled-memory.types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import type { AnySchemaObject } from 'ajv';
2
- import type { ExecutionGoalSnapshotV1 } from './goal-snapshot.types';
3
- import { type CognitionValidationResultV1 } from './cognitive-policy.schemas';
4
- export declare const executionGoalSnapshotSchema: AnySchemaObject;
5
- export declare function validateExecutionGoalSnapshot(value: unknown): CognitionValidationResultV1<ExecutionGoalSnapshotV1>;