@smartergpt/lexrunner 1.4.1 → 1.5.2

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.
@@ -133,6 +133,10 @@ var CONFIG_ERROR_CODES = {
133
133
  var POLICY_ERROR_CODES = {
134
134
  /** No policy file found in any search path */
135
135
  POLICY_NOT_FOUND: "POLICY_NOT_FOUND",
136
+ /** A policy output already exists and overwrite was not explicit */
137
+ POLICY_ALREADY_EXISTS: "POLICY_ALREADY_EXISTS",
138
+ /** A constrained policy source directory resolves outside the repository */
139
+ POLICY_SOURCE_DIR_OUTSIDE_ROOT: "POLICY_SOURCE_DIR_OUTSIDE_ROOT",
136
140
  /** Policy file exists but has invalid JSON */
137
141
  POLICY_PARSE_ERROR: "POLICY_PARSE_ERROR",
138
142
  /** Policy file fails schema validation */
@@ -9913,6 +9913,10 @@ var CONFIG_ERROR_CODES = {
9913
9913
  var POLICY_ERROR_CODES = {
9914
9914
  /** No policy file found in any search path */
9915
9915
  POLICY_NOT_FOUND: "POLICY_NOT_FOUND",
9916
+ /** A policy output already exists and overwrite was not explicit */
9917
+ POLICY_ALREADY_EXISTS: "POLICY_ALREADY_EXISTS",
9918
+ /** A constrained policy source directory resolves outside the repository */
9919
+ POLICY_SOURCE_DIR_OUTSIDE_ROOT: "POLICY_SOURCE_DIR_OUTSIDE_ROOT",
9916
9920
  /** Policy file exists but has invalid JSON */
9917
9921
  POLICY_PARSE_ERROR: "POLICY_PARSE_ERROR",
9918
9922
  /** Policy file fails schema validation */
@@ -10436,7 +10440,10 @@ var CLI_CAPABILITIES = Object.freeze({
10436
10440
  check: Object.freeze([]),
10437
10441
  timeline: Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_READ]),
10438
10442
  "frames:export": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_READ]),
10439
- "frames:import": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_WRITE]),
10443
+ "frames:import": Object.freeze([
10444
+ RUNTIME_OPERATION_CAPABILITIES.FRAME_READ,
10445
+ RUNTIME_OPERATION_CAPABILITIES.FRAME_WRITE
10446
+ ]),
10440
10447
  "db:vacuum": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_ADMIN]),
10441
10448
  "db:backup": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_ADMIN]),
10442
10449
  "db:repair": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_ADMIN]),
@@ -10447,6 +10454,7 @@ var CLI_CAPABILITIES = Object.freeze({
10447
10454
  "db:encrypt": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_ADMIN]),
10448
10455
  "db:stats": Object.freeze([RUNTIME_OPERATION_CAPABILITIES.FRAME_READ]),
10449
10456
  "policy:check": Object.freeze([]),
10457
+ "policy:generate": Object.freeze([]),
10450
10458
  "policy:add-module": Object.freeze([]),
10451
10459
  "instructions:init": Object.freeze([]),
10452
10460
  "instructions:generate": Object.freeze([]),
@@ -10936,6 +10944,7 @@ var FrameSpendMetadata = import_zod5.z.object({
10936
10944
  prompts: import_zod5.z.number().optional(),
10937
10945
  tokens_estimated: import_zod5.z.number().optional()
10938
10946
  });
10947
+ var CallerProvenance = import_zod5.z.record(import_zod5.z.string(), import_zod5.z.json());
10939
10948
  var ModuleAttribution = import_zod5.z.object({
10940
10949
  mode: import_zod5.z.enum(["explicit", "inferred", "fallback"]),
10941
10950
  confidence: import_zod5.z.enum(["high", "medium", "low"]),
@@ -10966,7 +10975,8 @@ var FrameStatusSnapshot = import_zod5.z.object({
10966
10975
  next_action: import_zod5.z.string(),
10967
10976
  blockers: import_zod5.z.array(import_zod5.z.string()).optional(),
10968
10977
  merge_blockers: import_zod5.z.array(import_zod5.z.string()).optional(),
10969
- tests_failing: import_zod5.z.array(import_zod5.z.string()).optional()
10978
+ tests_failing: import_zod5.z.array(import_zod5.z.string()).optional(),
10979
+ provenance: CallerProvenance.optional()
10970
10980
  });
10971
10981
  var CapabilityTier = import_zod5.z.enum(["senior", "mid", "junior"]);
10972
10982
  var TaskComplexity = import_zod5.z.object({
@@ -10994,7 +11004,7 @@ var Frame = import_zod5.z.object({
10994
11004
  status_snapshot: FrameStatusSnapshot,
10995
11005
  keywords: import_zod5.z.array(import_zod5.z.string()).optional(),
10996
11006
  atlas_frame_id: import_zod5.z.string().optional(),
10997
- // Link to Atlas Frame (spatial neighborhood)
11007
+ // Legacy Policy Neighborhood snapshot reference
10998
11008
  feature_flags: import_zod5.z.array(import_zod5.z.string()).optional(),
10999
11009
  permissions: import_zod5.z.array(import_zod5.z.string()).optional(),
11000
11010
  module_attribution: ModuleAttribution.optional(),
@@ -11218,6 +11228,13 @@ var COMPATIBILITY_OBJECTS = Object.freeze({
11218
11228
 
11219
11229
  // node_modules/@smartergpt/lex/dist/memory/store/postgres/scoped-frame-store.js
11220
11230
  var import_node_crypto14 = require("crypto");
11231
+ var FRAME_STORE_PROTECTED_RELATIONS = Object.freeze([
11232
+ "frames",
11233
+ "lex_frame_store_migrations",
11234
+ "lex_frame_store_unowned_frames_v1",
11235
+ "lex_frame_store_recovery_operations",
11236
+ "lex_frame_store_recovery_assignments"
11237
+ ]);
11221
11238
 
11222
11239
  // node_modules/@smartergpt/lex/dist/memory/store/postgres/behavioral-store.js
11223
11240
  var import_node_crypto15 = require("crypto");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartergpt/lexrunner",
3
- "version": "1.4.1",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24"
@@ -131,7 +131,7 @@
131
131
  "@modelcontextprotocol/sdk": "^1.18.2",
132
132
  "@octokit/auth-token": "^6.0.0",
133
133
  "@octokit/rest": "^22.0.0",
134
- "@smartergpt/lex": "^4.0.0",
134
+ "@smartergpt/lex": "4.0.3",
135
135
  "@types/babel__traverse": "^7.28.0",
136
136
  "ajv": "^8.20.0",
137
137
  "better-sqlite3-multiple-ciphers": "^12.6.2",
@@ -0,0 +1,161 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/Guffawaffle/lexrunner/schemas/gate-execution-receipt.schema.json",
4
+ "title": "LexRunner local gate execution receipt",
5
+ "description": "Bounded per-attempt evidence for one locally executed frozen gate.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "attempt",
11
+ "declaredGate",
12
+ "execution",
13
+ "outcome",
14
+ "output",
15
+ "artifacts"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": "lexrunner-gate-execution-receipt/v1" },
19
+ "attempt": { "type": "integer", "minimum": 1 },
20
+ "declaredGate": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["name", "run", "cwd", "runtime", "artifacts"],
24
+ "properties": {
25
+ "name": { "type": "string" },
26
+ "run": { "type": "string" },
27
+ "cwd": { "type": ["string", "null"] },
28
+ "runtime": { "enum": ["local", "container", "ci-service"] },
29
+ "artifacts": { "type": "array", "items": { "type": "string" } }
30
+ }
31
+ },
32
+ "execution": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["cwd", "startedAt", "finishedAt", "durationMs", "shell"],
36
+ "properties": {
37
+ "cwd": { "type": "string" },
38
+ "startedAt": { "type": "string", "format": "date-time" },
39
+ "finishedAt": { "type": "string", "format": "date-time" },
40
+ "durationMs": { "type": "number", "minimum": 0 },
41
+ "shell": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "command",
46
+ "executable",
47
+ "argv",
48
+ "identityAfter",
49
+ "unchanged",
50
+ "spawned"
51
+ ],
52
+ "properties": {
53
+ "command": { "enum": ["bash", "pwsh"] },
54
+ "executable": {
55
+ "anyOf": [{ "$ref": "#/definitions/fileIdentity" }, { "type": "null" }]
56
+ },
57
+ "argv": { "type": "array", "items": { "type": "string" } },
58
+ "identityAfter": {
59
+ "anyOf": [{ "$ref": "#/definitions/fileIdentity" }, { "type": "null" }]
60
+ },
61
+ "unchanged": { "type": "boolean" },
62
+ "spawned": { "type": "boolean" }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "outcome": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "status",
72
+ "exitCode",
73
+ "failureKind",
74
+ "timeoutCleanup",
75
+ "evidenceComplete"
76
+ ],
77
+ "properties": {
78
+ "status": { "enum": ["pass", "fail", "blocked", "skipped", "retrying"] },
79
+ "exitCode": { "type": ["integer", "null"] },
80
+ "failureKind": {
81
+ "enum": ["nonzero_exit", "spawn_error", "timeout", "evidence_error", null]
82
+ },
83
+ "timeoutCleanup": {
84
+ "anyOf": [
85
+ {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["method", "forceKilled", "descendantsReaped"],
89
+ "properties": {
90
+ "method": { "enum": ["process-group", "taskkill", "direct-child"] },
91
+ "forceKilled": { "type": "boolean" },
92
+ "descendantsReaped": { "type": "boolean" }
93
+ }
94
+ },
95
+ { "type": "null" }
96
+ ]
97
+ },
98
+ "evidenceComplete": { "type": "boolean" }
99
+ }
100
+ },
101
+ "output": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": ["stdout", "stderr"],
105
+ "properties": {
106
+ "stdout": { "$ref": "#/definitions/outputEvidence" },
107
+ "stderr": { "$ref": "#/definitions/outputEvidence" }
108
+ }
109
+ },
110
+ "artifacts": {
111
+ "type": "array",
112
+ "items": { "$ref": "#/definitions/artifactEvidence" }
113
+ }
114
+ },
115
+ "definitions": {
116
+ "fileIdentity": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": ["path", "realPath", "bytes", "mtimeMs", "sha256"],
120
+ "properties": {
121
+ "path": { "type": "string" },
122
+ "realPath": { "type": "string" },
123
+ "bytes": { "type": "integer", "minimum": 0 },
124
+ "mtimeMs": { "type": "number", "minimum": 0 },
125
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
126
+ }
127
+ },
128
+ "outputEvidence": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": ["bytes", "sha256", "truncated", "content"],
132
+ "properties": {
133
+ "bytes": { "type": "integer", "minimum": 0 },
134
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
135
+ "truncated": { "type": "boolean" },
136
+ "content": { "type": "string", "maxLength": 65536 }
137
+ }
138
+ },
139
+ "artifactEvidence": {
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": ["declaredPath", "resolvedPath", "status", "before", "source"],
143
+ "properties": {
144
+ "declaredPath": { "type": "string" },
145
+ "resolvedPath": { "type": "string" },
146
+ "status": {
147
+ "enum": ["collected", "missing", "stale", "unsupported", "collection_error"]
148
+ },
149
+ "before": {
150
+ "anyOf": [{ "$ref": "#/definitions/fileIdentity" }, { "type": "null" }]
151
+ },
152
+ "source": {
153
+ "anyOf": [{ "$ref": "#/definitions/fileIdentity" }, { "type": "null" }]
154
+ },
155
+ "retainedPath": { "type": "string" },
156
+ "retained": { "$ref": "#/definitions/fileIdentity" },
157
+ "error": { "type": "string", "maxLength": 1025 }
158
+ }
159
+ }
160
+ }
161
+ }