@akagilnc/pi-workflow-roles 0.1.3975 → 0.1.3977
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.
|
@@ -10215,7 +10215,6 @@ var init_session_assistant_usage = __esm({
|
|
|
10215
10215
|
});
|
|
10216
10216
|
|
|
10217
10217
|
// src/compliance-transport.ts
|
|
10218
|
-
import { Type as Type12 } from "typebox";
|
|
10219
10218
|
function readListField(value) {
|
|
10220
10219
|
return Array.isArray(value) ? value : value === void 0 ? [] : [value];
|
|
10221
10220
|
}
|
|
@@ -10335,16 +10334,13 @@ async function runComplianceAudit(options) {
|
|
|
10335
10334
|
return decision;
|
|
10336
10335
|
}
|
|
10337
10336
|
}
|
|
10338
|
-
var AUDITOR_DOSSIER_PROMPT,
|
|
10337
|
+
var AUDITOR_DOSSIER_PROMPT, AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE, AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE, ComplianceResponseRetentionError;
|
|
10339
10338
|
var init_compliance_transport = __esm({
|
|
10340
10339
|
"src/compliance-transport.ts"() {
|
|
10341
10340
|
"use strict";
|
|
10342
10341
|
init_auditor_dossier_tool();
|
|
10343
10342
|
init_gatekeeper_role();
|
|
10344
10343
|
AUDITOR_DOSSIER_PROMPT = "\u5377\u5B97\u6307\u9488\uFF1A";
|
|
10345
|
-
nonblank2 = Type12.String({ minLength: 1, pattern: "\\S" });
|
|
10346
|
-
decisionGateSchema = Type12.Object({ question: nonblank2, options: Type12.Array(nonblank2, { minItems: 1 }) }, { additionalProperties: false });
|
|
10347
|
-
complianceDecisionSchema = Type12.Object({ status: Type12.Unknown({ description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }), violations: Type12.Array(nonblank2, { description: "\u89C2\u5BDF\u5230\u7684\u5408\u89C4\u8FDD\u89C4" }), conflicts: Type12.Array(nonblank2, { description: "\u672A\u51B3\u6743\u5A01\u6216\u6267\u884C\u51B2\u7A81" }), decisionGate: Type12.Union([decisionGateSchema, Type12.Null()], { description: "\u5347\u7EA7\u95EE\u9898\u4E0E\u53EF\u9009\u9009\u9879" }) }, { additionalProperties: true, required: [] });
|
|
10348
10344
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
10349
10345
|
AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure";
|
|
10350
10346
|
ComplianceResponseRetentionError = class extends Error {
|
|
@@ -17735,18 +17731,18 @@ import { join as join35 } from "node:path";
|
|
|
17735
17731
|
import { Value as Value4 } from "typebox/value";
|
|
17736
17732
|
|
|
17737
17733
|
// src/activation-trace.ts
|
|
17738
|
-
import { Type as
|
|
17739
|
-
var causeSchema =
|
|
17740
|
-
identity:
|
|
17741
|
-
name:
|
|
17742
|
-
message:
|
|
17743
|
-
evidenceId:
|
|
17734
|
+
import { Type as Type12 } from "typebox";
|
|
17735
|
+
var causeSchema = Type12.Object({
|
|
17736
|
+
identity: Type12.String({ minLength: 1 }),
|
|
17737
|
+
name: Type12.String({ minLength: 1 }),
|
|
17738
|
+
message: Type12.String(),
|
|
17739
|
+
evidenceId: Type12.Optional(Type12.String({ minLength: 1 }))
|
|
17744
17740
|
}, { additionalProperties: false });
|
|
17745
|
-
var activationTraceRecordSchema =
|
|
17746
|
-
role:
|
|
17747
|
-
stageId:
|
|
17748
|
-
status:
|
|
17749
|
-
timestamp:
|
|
17741
|
+
var activationTraceRecordSchema = Type12.Object({
|
|
17742
|
+
role: Type12.String({ minLength: 1 }),
|
|
17743
|
+
stageId: Type12.String({ pattern: "^[a-z][a-z0-9-]*$" }),
|
|
17744
|
+
status: Type12.Literal("failed"),
|
|
17745
|
+
timestamp: Type12.String({ format: "date-time" }),
|
|
17750
17746
|
cause: causeSchema
|
|
17751
17747
|
}, { additionalProperties: false });
|
|
17752
17748
|
var activationCauseEvidence = 0;
|
|
@@ -18028,28 +18024,28 @@ function writeStderrJsonlRecord(record4, write = writeSync2) {
|
|
|
18028
18024
|
|
|
18029
18025
|
// src/tool-execution-observation.ts
|
|
18030
18026
|
import { writeSync as writeSync3 } from "node:fs";
|
|
18031
|
-
import { Type as
|
|
18027
|
+
import { Type as Type13 } from "typebox";
|
|
18032
18028
|
import { Value as Value2 } from "typebox/value";
|
|
18033
18029
|
var TOOL_EXECUTION_UPDATE_THROTTLE_MS = 3e4;
|
|
18034
18030
|
var observationBase = {
|
|
18035
|
-
role:
|
|
18036
|
-
toolCallId:
|
|
18037
|
-
toolName:
|
|
18038
|
-
timestamp:
|
|
18031
|
+
role: Type13.String({ minLength: 1 }),
|
|
18032
|
+
toolCallId: Type13.String({ minLength: 1 }),
|
|
18033
|
+
toolName: Type13.String({ minLength: 1 }),
|
|
18034
|
+
timestamp: Type13.String({ format: "date-time" })
|
|
18039
18035
|
};
|
|
18040
|
-
var toolExecutionObservationRecordSchema =
|
|
18041
|
-
|
|
18036
|
+
var toolExecutionObservationRecordSchema = Type13.Union([
|
|
18037
|
+
Type13.Object({
|
|
18042
18038
|
...observationBase,
|
|
18043
|
-
event:
|
|
18039
|
+
event: Type13.Literal("tool_execution_start")
|
|
18044
18040
|
}, { additionalProperties: true }),
|
|
18045
|
-
|
|
18041
|
+
Type13.Object({
|
|
18046
18042
|
...observationBase,
|
|
18047
|
-
event:
|
|
18043
|
+
event: Type13.Literal("tool_execution_update")
|
|
18048
18044
|
}, { additionalProperties: true }),
|
|
18049
|
-
|
|
18045
|
+
Type13.Object({
|
|
18050
18046
|
...observationBase,
|
|
18051
|
-
event:
|
|
18052
|
-
isError:
|
|
18047
|
+
event: Type13.Literal("tool_execution_end"),
|
|
18048
|
+
isError: Type13.Boolean()
|
|
18053
18049
|
}, { additionalProperties: true })
|
|
18054
18050
|
]);
|
|
18055
18051
|
function validateToolExecutionObservationRecord(record4) {
|
|
@@ -18143,10 +18139,10 @@ init_engine_detour();
|
|
|
18143
18139
|
|
|
18144
18140
|
// src/engine-detour-tool.ts
|
|
18145
18141
|
init_engine_detour();
|
|
18146
|
-
import { Type as
|
|
18147
|
-
var engineDetourArgsSchema =
|
|
18142
|
+
import { Type as Type14 } from "typebox";
|
|
18143
|
+
var engineDetourArgsSchema = Type14.Object(
|
|
18148
18144
|
{
|
|
18149
|
-
argv:
|
|
18145
|
+
argv: Type14.Array(Type14.String({ minLength: 1 }), {
|
|
18150
18146
|
minItems: 1,
|
|
18151
18147
|
description: "\u9996\u9879\u4E3A PATH \u4E2D\u7684\u53EF\u6267\u884C\u6587\u4EF6\uFF0C\u5176\u4F59\u9879\u4E3A\u53C2\u6570\u3002"
|
|
18152
18148
|
})
|
|
@@ -18257,63 +18253,63 @@ init_activation_ledger_topology();
|
|
|
18257
18253
|
// src/collector-tool-schemas.ts
|
|
18258
18254
|
init_open_tool_schema();
|
|
18259
18255
|
init_terminating_infrastructure();
|
|
18260
|
-
import { Type as
|
|
18261
|
-
var collectorObserveArgsSchema =
|
|
18262
|
-
var collectorRequestArgsSchema =
|
|
18263
|
-
requestId:
|
|
18256
|
+
import { Type as Type15 } from "typebox";
|
|
18257
|
+
var collectorObserveArgsSchema = Type15.Object({}, { additionalProperties: true });
|
|
18258
|
+
var collectorRequestArgsSchema = Type15.Object({
|
|
18259
|
+
requestId: Type15.String({
|
|
18264
18260
|
minLength: 1,
|
|
18265
18261
|
description: "\u8BF7\u6C42\u8EAB\u4EFD\uFF08\u914D\u7F6E id \u6216\u89D2\u8272\u5224\u5B9A\u7684\u7A33\u5B9A id\uFF1B\u9996\u5C3E\u65E0\u7A7A\u767D\uFF09"
|
|
18266
18262
|
}),
|
|
18267
|
-
snapshotId:
|
|
18263
|
+
snapshotId: Type15.String({ minLength: 1, description: "\u6700\u65B0\u7559\u5B58\u89C2\u5BDF\u5FEB\u7167" }),
|
|
18268
18264
|
// #836 r16 class 3: body.minLength deleted — manifest-configured requestId
|
|
18269
18265
|
// ignores body, and the unknown-requestId non-empty condition is a real
|
|
18270
18266
|
// branch in src/collector-ledger.ts:922-951, not a provider shape gate.
|
|
18271
|
-
body:
|
|
18267
|
+
body: Type15.Optional(Type15.String({
|
|
18272
18268
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u8BF7\u6C42\u6B63\u6587\uFF1Brequest-manifest \u672A\u6536\u5F55\u8BE5 requestId \u65F6\u5FC5\u586B"
|
|
18273
18269
|
}))
|
|
18274
18270
|
}, { additionalProperties: true });
|
|
18275
18271
|
var COLLECTOR_HANDBOOK_MAX_BYTES = 64 * 1024;
|
|
18276
|
-
var collectorHandbookWriteArgsSchema =
|
|
18277
|
-
scope:
|
|
18278
|
-
|
|
18279
|
-
|
|
18272
|
+
var collectorHandbookWriteArgsSchema = Type15.Object({
|
|
18273
|
+
scope: Type15.Union([
|
|
18274
|
+
Type15.Literal("general"),
|
|
18275
|
+
Type15.Literal("repo")
|
|
18280
18276
|
], { description: "general\uFF1D\u901A\u7528\u624B\u518C\uFF1Brepo\uFF1D\u5F53\u524D\u4ED3\u5E93\u5DEE\u5F02" }),
|
|
18281
|
-
body:
|
|
18277
|
+
body: Type15.String({
|
|
18282
18278
|
description: `\u624B\u518C\u5168\u6587\uFF08opaque \u5DE5\u4F5C\u8BB0\u5FC6\uFF1B\u6574\u4EFD\u66FF\u6362\uFF1BUTF-8 \u81F3\u591A ${COLLECTOR_HANDBOOK_MAX_BYTES} \u5B57\u8282\uFF09`
|
|
18283
18279
|
})
|
|
18284
18280
|
}, { additionalProperties: true });
|
|
18285
|
-
var collectorReadArgsSchema =
|
|
18286
|
-
evidenceId:
|
|
18281
|
+
var collectorReadArgsSchema = Type15.Object({
|
|
18282
|
+
evidenceId: Type15.String({ minLength: 1, description: "observe \u8FD4\u56DE\u7684\u6750\u6599\u8BC1\u636E id\uFF08evidenceId\uFF09" })
|
|
18287
18283
|
}, { additionalProperties: true });
|
|
18288
|
-
var collectorWaitArgsSchema =
|
|
18289
|
-
durationMs:
|
|
18284
|
+
var collectorWaitArgsSchema = Type15.Object({
|
|
18285
|
+
durationMs: Type15.Integer({
|
|
18290
18286
|
minimum: 1,
|
|
18291
18287
|
description: "\u7B49\u5F85\u6BEB\u79D2\uFF1B\u5B9E\u9645\u7761\u7720\u4E0D\u8D85\u8FC7\u5269\u4F59\u7B49\u5F85\u7A97\uFF08#678\uFF1B\u65E0\u5305\u5185\u5355\u6B21\u4EFB\u610F\u4E0A\u9650\uFF09"
|
|
18292
18288
|
})
|
|
18293
18289
|
}, { additionalProperties: true });
|
|
18294
|
-
var collectorOpenWaitWindowArgsSchema =
|
|
18295
|
-
startedAt:
|
|
18290
|
+
var collectorOpenWaitWindowArgsSchema = Type15.Object({
|
|
18291
|
+
startedAt: Type15.Optional(Type15.String({
|
|
18296
18292
|
description: "\u7B49\u5F85\u7A97\u8D77\u70B9 ISO \u65F6\u95F4\uFF1B\u65B0\u5EFA PR \u7528\u521B\u5EFA\u6210\u529F\u65F6\u523B\uFF1B\u7701\u7565\uFF1D\u73B0\u5728\uFF08\u89E6\u53D1\u9636\u6BB5\u7ED3\u675F\uFF09"
|
|
18297
18293
|
}))
|
|
18298
18294
|
}, { additionalProperties: true });
|
|
18299
|
-
var collectorBindTargetArgsSchema =
|
|
18300
|
-
prNumber:
|
|
18295
|
+
var collectorBindTargetArgsSchema = Type15.Object({
|
|
18296
|
+
prNumber: Type15.Optional(Type15.Unknown({
|
|
18301
18297
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u672C\u4ED3 PR \u53F7\uFF08\u6B63\u6574\u6570\uFF09\u3002\u4E0E issueNumber \u4E8C\u9009\u4E00\u6216\u540C\u6307\u552F\u4E00\u76EE\u6807\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
18302
18298
|
})),
|
|
18303
|
-
issueNumber:
|
|
18299
|
+
issueNumber: Type15.Optional(Type15.Unknown({
|
|
18304
18300
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u672C\u4ED3 issue \u53F7\uFF08\u6B63\u6574\u6570\uFF09\uFF1Bruntime \u7ECF\u7EBF\u4E0A\u5173\u8054\u89E3\u6790\u552F\u4E00 PR\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
18305
18301
|
}))
|
|
18306
18302
|
}, { additionalProperties: true });
|
|
18307
18303
|
var collectorFindingItemDeclaration = (() => {
|
|
18308
|
-
const item =
|
|
18304
|
+
const item = Type15.Object(
|
|
18309
18305
|
{
|
|
18310
|
-
evidenceId:
|
|
18306
|
+
evidenceId: Type15.Unknown({
|
|
18311
18307
|
description: "observe \u8FD4\u56DE\u7684\u6750\u6599\u6307\u9488\uFF08\u5FC5\u586B\u8BED\u4E49\uFF09"
|
|
18312
18308
|
}),
|
|
18313
|
-
category:
|
|
18309
|
+
category: Type15.Unknown({
|
|
18314
18310
|
description: "\u7B80\u77ED\u5F52\u7C7B\u6807\u7B7E\uFF0C\u4E0D\u662F\u6458\u8981"
|
|
18315
18311
|
}),
|
|
18316
|
-
summary:
|
|
18312
|
+
summary: Type15.Unknown({
|
|
18317
18313
|
description: "\u54EA\u4E2A bot\u3001\u4EC0\u4E48\u95EE\u9898\u7684\u6458\u8981\uFF1B\u4E0D\u8A8A\u6284\u6B63\u6587"
|
|
18318
18314
|
})
|
|
18319
18315
|
},
|
|
@@ -18326,14 +18322,14 @@ var collectorFindingItemDeclaration = (() => {
|
|
|
18326
18322
|
return item;
|
|
18327
18323
|
})();
|
|
18328
18324
|
var collectorOutputBaseSchema = openToolObject(
|
|
18329
|
-
|
|
18325
|
+
Type15.Object({
|
|
18330
18326
|
// No root type:array — host must not shape-reject non-array findings (#676 C).
|
|
18331
18327
|
// Nested item declarations ride `items` for registration preservation (ADR 0057).
|
|
18332
|
-
findings:
|
|
18328
|
+
findings: Type15.Unsafe({
|
|
18333
18329
|
description: "\u672C\u6B21\u6536\u96C6\u5230\u7684\u9010\u6761 findings\uFF08\u6307\u9488\u6570\u7EC4\u4E3A\u89C4\u8303\u5F62\uFF09\u3002\u96F6 finding \u7684\u6A21\u677F\u901A\u77E5\u4E0D\u5F97\u8FDB\u5165\uFF1B\u6B63\u5E38\u5B8C\u5DE5\u65E0 finding \u65F6\u7701\u7565\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002",
|
|
18334
18330
|
items: collectorFindingItemDeclaration
|
|
18335
18331
|
}),
|
|
18336
|
-
unfinishedReasons:
|
|
18332
|
+
unfinishedReasons: Type15.Unknown({
|
|
18337
18333
|
description: "\u672A\u5B8C\u6210\u539F\u56E0\u5B57\u7B26\u4E32\u6570\u7EC4\uFF08\u989D\u5EA6/\u6545\u969C/\u7B49\u5F85\u5C4A\u6EE1\u7B49\u73B0\u573A\u4F9D\u636E\uFF09\uFF1B\u4E0D\u5F97\u628A\u672A\u5B8C\u6210\u8868\u8FF0\u4E3A\u65E0\u95EE\u9898\u3002\u65E0\u53EF\u62A5\u544A\u65F6\u7701\u7565\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
18338
18334
|
})
|
|
18339
18335
|
})
|
|
@@ -19184,24 +19180,24 @@ init_notary_contracts();
|
|
|
19184
19180
|
init_terminating_infrastructure();
|
|
19185
19181
|
init_countersign_contracts();
|
|
19186
19182
|
init_countersign_contracts();
|
|
19187
|
-
import { Type as
|
|
19183
|
+
import { Type as Type16 } from "typebox";
|
|
19188
19184
|
var countersignVerdictSchema = withInfrastructureFailureDeclaration(
|
|
19189
|
-
|
|
19185
|
+
Type16.Object(
|
|
19190
19186
|
{
|
|
19191
|
-
countersignStatus:
|
|
19192
|
-
fix:
|
|
19193
|
-
|
|
19194
|
-
{ summary:
|
|
19187
|
+
countersignStatus: Type16.Unknown({ description: "converged | continue | escalate\u3002\u975E\u4E09\u6001\u65F6\u8BF7\u91CD\u8BFB\u540E\u91CD\u4EA4\uFF0C\u52FF\u6539\u6807\u3002" }),
|
|
19188
|
+
fix: Type16.Optional(
|
|
19189
|
+
Type16.Object(
|
|
19190
|
+
{ summary: Type16.Optional(Type16.String({ description: "\u9000\u56DE\u6458\u8981" })) },
|
|
19195
19191
|
{ additionalProperties: true, description: "\u9000\u56DE\u8BF4\u660E" }
|
|
19196
19192
|
)
|
|
19197
19193
|
),
|
|
19198
|
-
note:
|
|
19199
|
-
evidence:
|
|
19200
|
-
decisionGate:
|
|
19201
|
-
|
|
19194
|
+
note: Type16.Optional(Type16.String({ description: "\u9644\u6CE8" })),
|
|
19195
|
+
evidence: Type16.Optional(Type16.Unknown({ description: "\u7559\u5B58\u8BC1\u636E" })),
|
|
19196
|
+
decisionGate: Type16.Optional(
|
|
19197
|
+
Type16.Object(
|
|
19202
19198
|
{
|
|
19203
|
-
question:
|
|
19204
|
-
options:
|
|
19199
|
+
question: Type16.Optional(Type16.String()),
|
|
19200
|
+
options: Type16.Optional(Type16.Array(Type16.String()))
|
|
19205
19201
|
},
|
|
19206
19202
|
{ additionalProperties: true, description: "\u9700\u965B\u4E0B\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879" }
|
|
19207
19203
|
)
|
|
@@ -19227,18 +19223,18 @@ init_open_tool_schema();
|
|
|
19227
19223
|
init_terminating_infrastructure();
|
|
19228
19224
|
init_gleaner_left_contracts();
|
|
19229
19225
|
init_gleaner_left_contracts();
|
|
19230
|
-
import { Type as
|
|
19226
|
+
import { Type as Type17 } from "typebox";
|
|
19231
19227
|
var gleanerLeftOutputSchema = withInfrastructureFailureDeclaration(
|
|
19232
19228
|
openToolObject(
|
|
19233
|
-
|
|
19234
|
-
status:
|
|
19229
|
+
Type17.Object({
|
|
19230
|
+
status: Type17.Unknown({
|
|
19235
19231
|
description: "completed \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
19236
19232
|
}),
|
|
19237
|
-
findings:
|
|
19238
|
-
|
|
19233
|
+
findings: Type17.Array(
|
|
19234
|
+
Type17.Object(
|
|
19239
19235
|
{
|
|
19240
|
-
pointer:
|
|
19241
|
-
statement:
|
|
19236
|
+
pointer: Type17.Optional(Type17.String({ description: "\u6587\u4EF6/\u884C\u6307\u9488" })),
|
|
19237
|
+
statement: Type17.Optional(Type17.String({ description: "\u7591\u70B9\u9648\u8FF0" }))
|
|
19242
19238
|
},
|
|
19243
19239
|
{ additionalProperties: true, description: "\u4E00\u6761\u5F39\u7AE0" }
|
|
19244
19240
|
),
|
|
@@ -19262,17 +19258,17 @@ init_gleaner_left_contracts();
|
|
|
19262
19258
|
init_open_tool_schema();
|
|
19263
19259
|
init_terminating_infrastructure();
|
|
19264
19260
|
init_inspector_contracts();
|
|
19265
|
-
import { Type as
|
|
19261
|
+
import { Type as Type18 } from "typebox";
|
|
19266
19262
|
var inspectorOutputSchema = withInfrastructureFailureDeclaration(
|
|
19267
19263
|
openToolObject(
|
|
19268
|
-
|
|
19269
|
-
status:
|
|
19264
|
+
Type18.Object({
|
|
19265
|
+
status: Type18.Unknown({
|
|
19270
19266
|
description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
19271
19267
|
}),
|
|
19272
|
-
findings:
|
|
19268
|
+
findings: Type18.Unknown({
|
|
19273
19269
|
description: "\u968F\u4EA4\u5377\u7559\u5B58\u7684\u95EE\u9898\u8BB0\u5F55"
|
|
19274
19270
|
}),
|
|
19275
|
-
reason:
|
|
19271
|
+
reason: Type18.Optional(Type18.Unknown({
|
|
19276
19272
|
description: "status \u4E3A escalate \u65F6\u7684\u4E0A\u5448\u7406\u7531"
|
|
19277
19273
|
}))
|
|
19278
19274
|
})
|
|
@@ -19294,45 +19290,45 @@ init_open_tool_schema();
|
|
|
19294
19290
|
init_terminating_infrastructure();
|
|
19295
19291
|
init_diarist_contracts();
|
|
19296
19292
|
init_diarist_contracts();
|
|
19297
|
-
import { Type as
|
|
19293
|
+
import { Type as Type19 } from "typebox";
|
|
19298
19294
|
var diaristOutputSchema = withInfrastructureFailureDeclaration(
|
|
19299
19295
|
openToolObject(
|
|
19300
|
-
|
|
19301
|
-
status:
|
|
19296
|
+
Type19.Object({
|
|
19297
|
+
status: Type19.Unknown({
|
|
19302
19298
|
description: "completed | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
19303
19299
|
}),
|
|
19304
|
-
ticketNumber:
|
|
19305
|
-
|
|
19300
|
+
ticketNumber: Type19.Optional(
|
|
19301
|
+
Type19.Unknown({
|
|
19306
19302
|
description: "\u672C\u5EAD\u5BF9\u8C61\u7968\u53F7\uFF08\u6B63\u6574\u6570\uFF09\u6216 null/\u7701\u7565\uFF1D\u771F\u65E0\u7968\uFF1B\u4E0B\u6E38\u8D70 typed \u952E\uFF1B\u8BA4\u4E0D\u51FA\u7528 status=escalate\uFF0C\u4E0D\u6D17\u6210\u65E0\u5F55\u3002\u673A\u68B0\u5C42\u4E0D\u91CD\u5224\u3002"
|
|
19307
19303
|
})
|
|
19308
19304
|
),
|
|
19309
|
-
reason:
|
|
19310
|
-
|
|
19305
|
+
reason: Type19.Optional(
|
|
19306
|
+
Type19.String({
|
|
19311
19307
|
description: "status \u4E3A escalate \u65F6\uFF1A\u8BA4\u4E0D\u51FA\u672C\u5EAD\u5BF9\u8C61\u7684\u539F\u56E0"
|
|
19312
19308
|
})
|
|
19313
19309
|
),
|
|
19314
|
-
entries:
|
|
19315
|
-
|
|
19316
|
-
|
|
19310
|
+
entries: Type19.Optional(
|
|
19311
|
+
Type19.Array(
|
|
19312
|
+
Type19.Object(
|
|
19317
19313
|
{
|
|
19318
|
-
sourceKind:
|
|
19314
|
+
sourceKind: Type19.Optional(Type19.String({
|
|
19319
19315
|
description: "\u6765\u6E90\u65CF\uFF1Acc-session | issue-body-comment | adr-decision-key | ticket-decree-block"
|
|
19320
19316
|
})),
|
|
19321
|
-
sourceRef:
|
|
19317
|
+
sourceRef: Type19.Optional(Type19.Object(
|
|
19322
19318
|
{
|
|
19323
|
-
sessionFile:
|
|
19324
|
-
entryId:
|
|
19325
|
-
path:
|
|
19326
|
-
url:
|
|
19319
|
+
sessionFile: Type19.Optional(Type19.String()),
|
|
19320
|
+
entryId: Type19.Optional(Type19.Unknown()),
|
|
19321
|
+
path: Type19.Optional(Type19.String()),
|
|
19322
|
+
url: Type19.Optional(Type19.String())
|
|
19327
19323
|
},
|
|
19328
19324
|
{ additionalProperties: true, description: "\u4E0D\u53EF\u53D8\u6E90\u6307\u9488" }
|
|
19329
19325
|
)),
|
|
19330
|
-
transcript:
|
|
19326
|
+
transcript: Type19.Optional(Type19.String({
|
|
19331
19327
|
description: "\u6574\u5757\u539F\u6587\uFF08\u8A8A\u5F55\u6574\u5757\uFF0C\u4E0D\u6307\u9488\u5316\uFF09"
|
|
19332
19328
|
})),
|
|
19333
|
-
timestamp:
|
|
19334
|
-
note:
|
|
19335
|
-
|
|
19329
|
+
timestamp: Type19.Optional(Type19.String({ description: "\u6E90\u65F6\u95F4\u6233 ISO" })),
|
|
19330
|
+
note: Type19.Optional(
|
|
19331
|
+
Type19.String({ description: "\u8BE5\u6750\u6599\u4E0E\u672C\u6848\u7684\u5173\u7CFB\uFF08\u4EBA\u8BFB\uFF09" })
|
|
19336
19332
|
)
|
|
19337
19333
|
},
|
|
19338
19334
|
{ additionalProperties: true, description: "\u4E00\u6761\u5165\u5F55\u6574\u5757" }
|
|
@@ -19430,13 +19426,13 @@ init_packaged_role_registry();
|
|
|
19430
19426
|
init_activation_ledger_topology();
|
|
19431
19427
|
import { resolve as resolve16 } from "node:path";
|
|
19432
19428
|
import "@earendil-works/pi-coding-agent";
|
|
19433
|
-
import { Type as
|
|
19429
|
+
import { Type as Type21 } from "typebox";
|
|
19434
19430
|
|
|
19435
19431
|
// src/navigator-public-session.ts
|
|
19436
19432
|
init_sitian_facade();
|
|
19437
19433
|
|
|
19438
19434
|
// src/navigator-session-contracts.ts
|
|
19439
|
-
import { Type as
|
|
19435
|
+
import { Type as Type20 } from "typebox";
|
|
19440
19436
|
import { Value as Value3 } from "typebox/value";
|
|
19441
19437
|
var NAVIGATOR_PREPARE_TOOL_NAME = "ak_navigator_prepare";
|
|
19442
19438
|
var NAVIGATOR_DEFAULT_MODEL = "openai-codex/gpt-5.6-luna:max";
|
|
@@ -19527,26 +19523,26 @@ function navigatorProviderFailureFromDiagnostics(diagnostics) {
|
|
|
19527
19523
|
}
|
|
19528
19524
|
return void 0;
|
|
19529
19525
|
}
|
|
19530
|
-
var navigatorProviderFailureSchema =
|
|
19531
|
-
source:
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19526
|
+
var navigatorProviderFailureSchema = Type20.Object({
|
|
19527
|
+
source: Type20.Union([
|
|
19528
|
+
Type20.Literal("context"),
|
|
19529
|
+
Type20.Literal("session"),
|
|
19530
|
+
Type20.Literal("model"),
|
|
19531
|
+
Type20.Literal("thinking"),
|
|
19532
|
+
Type20.Literal("auth"),
|
|
19533
|
+
Type20.Literal("quota"),
|
|
19534
|
+
Type20.Literal("transport"),
|
|
19535
|
+
Type20.Literal("unknown")
|
|
19540
19536
|
]),
|
|
19541
|
-
cause:
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19537
|
+
cause: Type20.Union([
|
|
19538
|
+
Type20.Literal("context"),
|
|
19539
|
+
Type20.Literal("session"),
|
|
19540
|
+
Type20.Literal("model"),
|
|
19541
|
+
Type20.Literal("thinking"),
|
|
19542
|
+
Type20.Literal("auth"),
|
|
19543
|
+
Type20.Literal("quota"),
|
|
19544
|
+
Type20.Literal("transport"),
|
|
19545
|
+
Type20.Literal("unknown")
|
|
19550
19546
|
])
|
|
19551
19547
|
}, { additionalProperties: false });
|
|
19552
19548
|
function parseNavigatorModelSetting(value) {
|
|
@@ -19776,8 +19772,8 @@ function resolveNavigatorAuthorityMaterial(roleInput, fileAuthority) {
|
|
|
19776
19772
|
return void 0;
|
|
19777
19773
|
}
|
|
19778
19774
|
var NAVIGATOR_TARGETS = PACKAGED_ROLE_REGISTRY.map(({ role, phases }) => ({ role, phases }));
|
|
19779
|
-
var prepareSchema =
|
|
19780
|
-
candidates:
|
|
19775
|
+
var prepareSchema = Type21.Object({
|
|
19776
|
+
candidates: Type21.Optional(Type21.Unknown({
|
|
19781
19777
|
description: "\u65B9\u5411\u5019\u9009\uFF1Bcandidates[].next.role \u5FC5\u586B\uFF0Cphase \u53EF\u9009\uFF0Croute/matches/reason/command \u53EF\u9009\u4E0A\u4E0B\u6587\uFF0C\u975E\u53D7\u7406\u95F8"
|
|
19782
19778
|
}))
|
|
19783
19779
|
}, { additionalProperties: true });
|
|
@@ -20407,32 +20403,32 @@ init_audit_escalation();
|
|
|
20407
20403
|
init_terminating_infrastructure();
|
|
20408
20404
|
init_submission_errors();
|
|
20409
20405
|
init_judge_output();
|
|
20410
|
-
import { Type as
|
|
20406
|
+
import { Type as Type22 } from "typebox";
|
|
20411
20407
|
var JUDGE_QUEUE_STATUSES = /* @__PURE__ */ new Set(["converged", "continue", "escalate"]);
|
|
20412
20408
|
var JUDGE_STATUS_REASK = "judgeStatus \u4E0D\u662F converged\u3001continue\u3001escalate \u4E09\u6001\u4E4B\u4E00\u3002\u8BF7\u91CD\u65B0\u4EA4\u5377\uFF0Cstatus \u5199\u660E\u5176\u4E00\u3002";
|
|
20413
20409
|
var judgeVerdictSchema = withInfrastructureFailureDeclaration(
|
|
20414
|
-
|
|
20410
|
+
Type22.Object(
|
|
20415
20411
|
{
|
|
20416
|
-
judgeStatus:
|
|
20417
|
-
fix:
|
|
20418
|
-
|
|
20419
|
-
{ summary:
|
|
20412
|
+
judgeStatus: Type22.Unknown({ description: "converged | continue | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }),
|
|
20413
|
+
fix: Type22.Optional(
|
|
20414
|
+
Type22.Object(
|
|
20415
|
+
{ summary: Type22.Optional(Type22.String({ description: "continue \u65F6\u7684\u8865\u6551\u6458\u8981" })) },
|
|
20420
20416
|
{ additionalProperties: true, description: "continue \u65F6\u7684\u8865\u6551\u8BF4\u660E" }
|
|
20421
20417
|
)
|
|
20422
20418
|
),
|
|
20423
|
-
classes:
|
|
20424
|
-
name:
|
|
20425
|
-
owner:
|
|
20426
|
-
boundary:
|
|
20427
|
-
disposition:
|
|
20419
|
+
classes: Type22.Optional(Type22.Array(Type22.Object({
|
|
20420
|
+
name: Type22.Optional(Type22.String()),
|
|
20421
|
+
owner: Type22.Optional(Type22.String()),
|
|
20422
|
+
boundary: Type22.Optional(Type22.String()),
|
|
20423
|
+
disposition: Type22.Optional(Type22.String())
|
|
20428
20424
|
}, { additionalProperties: true }), { description: "\u5DF2\u88C1\u51B3 finding \u7C7B\u53CA\u5176 owner \u4E0E\u4FEE\u7406\u8FB9\u754C" })),
|
|
20429
|
-
note:
|
|
20430
|
-
evidence:
|
|
20431
|
-
decisionGate:
|
|
20432
|
-
|
|
20425
|
+
note: Type22.Optional(Type22.String({ description: "\u53EF\u9009\u88C1\u51B3\u9644\u6CE8" })),
|
|
20426
|
+
evidence: Type22.Optional(Type22.Unknown({ description: "\u7559\u5B58\u7684\u88C1\u51B3\u8BC1\u636E" })),
|
|
20427
|
+
decisionGate: Type22.Optional(
|
|
20428
|
+
Type22.Object(
|
|
20433
20429
|
{
|
|
20434
|
-
question:
|
|
20435
|
-
options:
|
|
20430
|
+
question: Type22.Optional(Type22.String()),
|
|
20431
|
+
options: Type22.Optional(Type22.Array(Type22.String()))
|
|
20436
20432
|
},
|
|
20437
20433
|
{ additionalProperties: true, description: "\u9700\u4EBA\u6743\u5A01\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879" }
|
|
20438
20434
|
)
|
|
@@ -20516,21 +20512,21 @@ init_open_tool_schema();
|
|
|
20516
20512
|
init_terminating_infrastructure();
|
|
20517
20513
|
init_reviewer_pinned_git();
|
|
20518
20514
|
init_reviewer_output();
|
|
20519
|
-
import { Type as
|
|
20520
|
-
var reviewerAmendmentsSchema =
|
|
20521
|
-
standards:
|
|
20522
|
-
spec:
|
|
20515
|
+
import { Type as Type23 } from "typebox";
|
|
20516
|
+
var reviewerAmendmentsSchema = Type23.Object({
|
|
20517
|
+
standards: Type23.Optional(Type23.String({ description: "\u76F8\u5BF9 Standards \u5B50\u62A5\u544A\u7684\u589E\u91CF\uFF1A\u589E finding\u3001\u64A4\u56DE\u6216\u4E8B\u5B9E\u66F4\u6B63" })),
|
|
20518
|
+
spec: Type23.Optional(Type23.String({ description: "\u76F8\u5BF9 Spec \u5B50\u62A5\u544A\u7684\u589E\u91CF\uFF1A\u589E finding\u3001\u64A4\u56DE\u6216\u4E8B\u5B9E\u66F4\u6B63" }))
|
|
20523
20519
|
}, { additionalProperties: true, description: "\u76F8\u5BF9\u5B50\u62A5\u544A\u7684\u53EF\u9009\u8F74\u589E\u91CF\uFF1B\u975E\u66FF\u4EE3\u62A5\u544A\u3002\u65E0\u589E\u91CF\u7684\u8F74\u53EF\u7701\u7565\u3002" });
|
|
20524
20520
|
var REVIEWER_STATUS_DESCRIPTION = "completed | refused \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8";
|
|
20525
|
-
var reviewerOutputVariants =
|
|
20526
|
-
|
|
20527
|
-
status:
|
|
20528
|
-
amendments:
|
|
20521
|
+
var reviewerOutputVariants = Type23.Union([
|
|
20522
|
+
Type23.Object({
|
|
20523
|
+
status: Type23.Unknown({ description: REVIEWER_STATUS_DESCRIPTION }),
|
|
20524
|
+
amendments: Type23.Optional(reviewerAmendmentsSchema)
|
|
20529
20525
|
}, { additionalProperties: false }),
|
|
20530
|
-
|
|
20531
|
-
status:
|
|
20532
|
-
diagnostic:
|
|
20533
|
-
amendments:
|
|
20526
|
+
Type23.Object({
|
|
20527
|
+
status: Type23.Unknown({ description: REVIEWER_STATUS_DESCRIPTION }),
|
|
20528
|
+
diagnostic: Type23.String({ description: "\u62D2\u7EDD\u8BCA\u65AD\u8BF4\u660E" }),
|
|
20529
|
+
amendments: Type23.Optional(reviewerAmendmentsSchema)
|
|
20534
20530
|
}, { additionalProperties: false })
|
|
20535
20531
|
]);
|
|
20536
20532
|
var reviewerOutputSchema = withInfrastructureFailureDeclaration(
|
|
@@ -20586,7 +20582,7 @@ init_submission_correctable_error();
|
|
|
20586
20582
|
init_worker_output();
|
|
20587
20583
|
init_fixer_output();
|
|
20588
20584
|
init_fixer_packet();
|
|
20589
|
-
import { Type as
|
|
20585
|
+
import { Type as Type24 } from "typebox";
|
|
20590
20586
|
|
|
20591
20587
|
// src/worker-submission-gates.ts
|
|
20592
20588
|
init_archivist_record_entry();
|
|
@@ -20851,20 +20847,20 @@ function fixerBashSeatbeltDenyReason(matched) {
|
|
|
20851
20847
|
|
|
20852
20848
|
// src/worker-role.ts
|
|
20853
20849
|
var CODER_STATUS_DESCRIPTION = "planned | completed | refused | unfinished \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\uFF1Bcompleted \u56DE\u6267\u542B TDD\u3001\u540C\u6A21\u5F0F\u3001\u5F15\u5165\u56DE\u5F52\u3001\u884C\u4E3A\u4E8B\u5B9E\u56DB\u9879\u8BC1\u636E\uFF1Bunfinished \u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u81F4\u672C\u5C40\u672A\u5B8C\u6210\u65F6\u53EF\u7528\uFF0C\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002";
|
|
20854
|
-
var coderOutputVariants =
|
|
20855
|
-
|
|
20856
|
-
status:
|
|
20857
|
-
report:
|
|
20850
|
+
var coderOutputVariants = Type24.Union([
|
|
20851
|
+
Type24.Object({
|
|
20852
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20853
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" })
|
|
20858
20854
|
}, { additionalProperties: false }),
|
|
20859
|
-
|
|
20860
|
-
status:
|
|
20861
|
-
report:
|
|
20855
|
+
Type24.Object({
|
|
20856
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20857
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" })
|
|
20862
20858
|
}, { additionalProperties: false }),
|
|
20863
|
-
|
|
20864
|
-
status:
|
|
20865
|
-
report:
|
|
20866
|
-
remainingScope:
|
|
20867
|
-
reason:
|
|
20859
|
+
Type24.Object({
|
|
20860
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20861
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
20862
|
+
remainingScope: Type24.String({ description: "\u672C\u5C40\u540E\u5269\u4F59\u5DE5\u4F5C" }),
|
|
20863
|
+
reason: Type24.Optional(Type24.String({
|
|
20868
20864
|
minLength: 1,
|
|
20869
20865
|
description: "\u963B\u65AD\u539F\u56E0\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u3002\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002"
|
|
20870
20866
|
}))
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
1
|
import { auditorRunDirectory } from "./auditor-dossier-tool.js";
|
|
3
2
|
import { OFFICER_CONCLUSION_REASK } from "./gatekeeper-role.js";
|
|
4
3
|
const AUDITOR_DOSSIER_PROMPT = "\u5377\u5B97\u6307\u9488\uFF1A";
|
|
5
|
-
const nonblank = Type.String({ minLength: 1, pattern: "\\S" });
|
|
6
|
-
const decisionGateSchema = Type.Object({ question: nonblank, options: Type.Array(nonblank, { minItems: 1 }) }, { additionalProperties: false });
|
|
7
|
-
const complianceDecisionSchema = Type.Object({ status: Type.Unknown({ description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }), violations: Type.Array(nonblank, { description: "\u89C2\u5BDF\u5230\u7684\u5408\u89C4\u8FDD\u89C4" }), conflicts: Type.Array(nonblank, { description: "\u672A\u51B3\u6743\u5A01\u6216\u6267\u884C\u51B2\u7A81" }), decisionGate: Type.Union([decisionGateSchema, Type.Null()], { description: "\u5347\u7EA7\u95EE\u9898\u4E0E\u53EF\u9009\u9009\u9879" }) }, { additionalProperties: true, required: [] });
|
|
8
4
|
const COMPLIANCE_RESPONSE_ENTRY_TYPE = "ak_compliance_response";
|
|
9
5
|
const AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
10
6
|
const AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure";
|
|
@@ -139,7 +135,6 @@ export {
|
|
|
139
135
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE,
|
|
140
136
|
COMPLIANCE_RESPONSE_ENTRY_TYPE,
|
|
141
137
|
ComplianceResponseRetentionError,
|
|
142
|
-
complianceDecisionSchema,
|
|
143
138
|
readComplianceCandidate,
|
|
144
139
|
runComplianceAudit,
|
|
145
140
|
tryReadComplianceCandidate
|
|
@@ -17303,7 +17303,6 @@ var init_session_assistant_usage = __esm({
|
|
|
17303
17303
|
});
|
|
17304
17304
|
|
|
17305
17305
|
// src/compliance-transport.ts
|
|
17306
|
-
import { Type as Type12 } from "typebox";
|
|
17307
17306
|
function readListField(value) {
|
|
17308
17307
|
return Array.isArray(value) ? value : value === void 0 ? [] : [value];
|
|
17309
17308
|
}
|
|
@@ -17423,16 +17422,13 @@ async function runComplianceAudit(options) {
|
|
|
17423
17422
|
return decision;
|
|
17424
17423
|
}
|
|
17425
17424
|
}
|
|
17426
|
-
var AUDITOR_DOSSIER_PROMPT,
|
|
17425
|
+
var AUDITOR_DOSSIER_PROMPT, AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE, AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE, ComplianceResponseRetentionError;
|
|
17427
17426
|
var init_compliance_transport = __esm({
|
|
17428
17427
|
"src/compliance-transport.ts"() {
|
|
17429
17428
|
"use strict";
|
|
17430
17429
|
init_auditor_dossier_tool();
|
|
17431
17430
|
init_gatekeeper_role();
|
|
17432
17431
|
AUDITOR_DOSSIER_PROMPT = "\u5377\u5B97\u6307\u9488\uFF1A";
|
|
17433
|
-
nonblank2 = Type12.String({ minLength: 1, pattern: "\\S" });
|
|
17434
|
-
decisionGateSchema = Type12.Object({ question: nonblank2, options: Type12.Array(nonblank2, { minItems: 1 }) }, { additionalProperties: false });
|
|
17435
|
-
complianceDecisionSchema = Type12.Object({ status: Type12.Unknown({ description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }), violations: Type12.Array(nonblank2, { description: "\u89C2\u5BDF\u5230\u7684\u5408\u89C4\u8FDD\u89C4" }), conflicts: Type12.Array(nonblank2, { description: "\u672A\u51B3\u6743\u5A01\u6216\u6267\u884C\u51B2\u7A81" }), decisionGate: Type12.Union([decisionGateSchema, Type12.Null()], { description: "\u5347\u7EA7\u95EE\u9898\u4E0E\u53EF\u9009\u9009\u9879" }) }, { additionalProperties: true, required: [] });
|
|
17436
17432
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
17437
17433
|
AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure";
|
|
17438
17434
|
ComplianceResponseRetentionError = class extends Error {
|
|
@@ -17733,13 +17729,13 @@ init_packaged_role_registry();
|
|
|
17733
17729
|
init_activation_ledger_topology();
|
|
17734
17730
|
import { resolve as resolve15 } from "node:path";
|
|
17735
17731
|
import "@earendil-works/pi-coding-agent";
|
|
17736
|
-
import { Type as
|
|
17732
|
+
import { Type as Type13 } from "typebox";
|
|
17737
17733
|
|
|
17738
17734
|
// src/navigator-public-session.ts
|
|
17739
17735
|
init_sitian_facade();
|
|
17740
17736
|
|
|
17741
17737
|
// src/navigator-session-contracts.ts
|
|
17742
|
-
import { Type as
|
|
17738
|
+
import { Type as Type12 } from "typebox";
|
|
17743
17739
|
import { Value as Value2 } from "typebox/value";
|
|
17744
17740
|
var NAVIGATOR_PREPARE_TOOL_NAME = "ak_navigator_prepare";
|
|
17745
17741
|
var NAVIGATOR_DEFAULT_MODEL = "openai-codex/gpt-5.6-luna:max";
|
|
@@ -17830,26 +17826,26 @@ function navigatorProviderFailureFromDiagnostics(diagnostics) {
|
|
|
17830
17826
|
}
|
|
17831
17827
|
return void 0;
|
|
17832
17828
|
}
|
|
17833
|
-
var navigatorProviderFailureSchema =
|
|
17834
|
-
source:
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17829
|
+
var navigatorProviderFailureSchema = Type12.Object({
|
|
17830
|
+
source: Type12.Union([
|
|
17831
|
+
Type12.Literal("context"),
|
|
17832
|
+
Type12.Literal("session"),
|
|
17833
|
+
Type12.Literal("model"),
|
|
17834
|
+
Type12.Literal("thinking"),
|
|
17835
|
+
Type12.Literal("auth"),
|
|
17836
|
+
Type12.Literal("quota"),
|
|
17837
|
+
Type12.Literal("transport"),
|
|
17838
|
+
Type12.Literal("unknown")
|
|
17843
17839
|
]),
|
|
17844
|
-
cause:
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17840
|
+
cause: Type12.Union([
|
|
17841
|
+
Type12.Literal("context"),
|
|
17842
|
+
Type12.Literal("session"),
|
|
17843
|
+
Type12.Literal("model"),
|
|
17844
|
+
Type12.Literal("thinking"),
|
|
17845
|
+
Type12.Literal("auth"),
|
|
17846
|
+
Type12.Literal("quota"),
|
|
17847
|
+
Type12.Literal("transport"),
|
|
17848
|
+
Type12.Literal("unknown")
|
|
17853
17849
|
])
|
|
17854
17850
|
}, { additionalProperties: false });
|
|
17855
17851
|
function parseNavigatorModelSetting(value) {
|
|
@@ -18079,8 +18075,8 @@ function resolveNavigatorAuthorityMaterial(roleInput, fileAuthority) {
|
|
|
18079
18075
|
return void 0;
|
|
18080
18076
|
}
|
|
18081
18077
|
var NAVIGATOR_TARGETS = PACKAGED_ROLE_REGISTRY.map(({ role, phases }) => ({ role, phases }));
|
|
18082
|
-
var prepareSchema =
|
|
18083
|
-
candidates:
|
|
18078
|
+
var prepareSchema = Type13.Object({
|
|
18079
|
+
candidates: Type13.Optional(Type13.Unknown({
|
|
18084
18080
|
description: "\u65B9\u5411\u5019\u9009\uFF1Bcandidates[].next.role \u5FC5\u586B\uFF0Cphase \u53EF\u9009\uFF0Croute/matches/reason/command \u53EF\u9009\u4E0A\u4E0B\u6587\uFF0C\u975E\u53D7\u7406\u95F8"
|
|
18085
18081
|
}))
|
|
18086
18082
|
}, { additionalProperties: true });
|
|
@@ -18834,18 +18830,18 @@ import { join as join35 } from "node:path";
|
|
|
18834
18830
|
import { Value as Value4 } from "typebox/value";
|
|
18835
18831
|
|
|
18836
18832
|
// src/activation-trace.ts
|
|
18837
|
-
import { Type as
|
|
18838
|
-
var causeSchema =
|
|
18839
|
-
identity:
|
|
18840
|
-
name:
|
|
18841
|
-
message:
|
|
18842
|
-
evidenceId:
|
|
18833
|
+
import { Type as Type14 } from "typebox";
|
|
18834
|
+
var causeSchema = Type14.Object({
|
|
18835
|
+
identity: Type14.String({ minLength: 1 }),
|
|
18836
|
+
name: Type14.String({ minLength: 1 }),
|
|
18837
|
+
message: Type14.String(),
|
|
18838
|
+
evidenceId: Type14.Optional(Type14.String({ minLength: 1 }))
|
|
18843
18839
|
}, { additionalProperties: false });
|
|
18844
|
-
var activationTraceRecordSchema =
|
|
18845
|
-
role:
|
|
18846
|
-
stageId:
|
|
18847
|
-
status:
|
|
18848
|
-
timestamp:
|
|
18840
|
+
var activationTraceRecordSchema = Type14.Object({
|
|
18841
|
+
role: Type14.String({ minLength: 1 }),
|
|
18842
|
+
stageId: Type14.String({ pattern: "^[a-z][a-z0-9-]*$" }),
|
|
18843
|
+
status: Type14.Literal("failed"),
|
|
18844
|
+
timestamp: Type14.String({ format: "date-time" }),
|
|
18849
18845
|
cause: causeSchema
|
|
18850
18846
|
}, { additionalProperties: false });
|
|
18851
18847
|
var activationCauseEvidence = 0;
|
|
@@ -19127,28 +19123,28 @@ function writeStderrJsonlRecord(record4, write = writeSync2) {
|
|
|
19127
19123
|
|
|
19128
19124
|
// src/tool-execution-observation.ts
|
|
19129
19125
|
import { writeSync as writeSync3 } from "node:fs";
|
|
19130
|
-
import { Type as
|
|
19126
|
+
import { Type as Type15 } from "typebox";
|
|
19131
19127
|
import { Value as Value3 } from "typebox/value";
|
|
19132
19128
|
var TOOL_EXECUTION_UPDATE_THROTTLE_MS = 3e4;
|
|
19133
19129
|
var observationBase = {
|
|
19134
|
-
role:
|
|
19135
|
-
toolCallId:
|
|
19136
|
-
toolName:
|
|
19137
|
-
timestamp:
|
|
19130
|
+
role: Type15.String({ minLength: 1 }),
|
|
19131
|
+
toolCallId: Type15.String({ minLength: 1 }),
|
|
19132
|
+
toolName: Type15.String({ minLength: 1 }),
|
|
19133
|
+
timestamp: Type15.String({ format: "date-time" })
|
|
19138
19134
|
};
|
|
19139
|
-
var toolExecutionObservationRecordSchema =
|
|
19140
|
-
|
|
19135
|
+
var toolExecutionObservationRecordSchema = Type15.Union([
|
|
19136
|
+
Type15.Object({
|
|
19141
19137
|
...observationBase,
|
|
19142
|
-
event:
|
|
19138
|
+
event: Type15.Literal("tool_execution_start")
|
|
19143
19139
|
}, { additionalProperties: true }),
|
|
19144
|
-
|
|
19140
|
+
Type15.Object({
|
|
19145
19141
|
...observationBase,
|
|
19146
|
-
event:
|
|
19142
|
+
event: Type15.Literal("tool_execution_update")
|
|
19147
19143
|
}, { additionalProperties: true }),
|
|
19148
|
-
|
|
19144
|
+
Type15.Object({
|
|
19149
19145
|
...observationBase,
|
|
19150
|
-
event:
|
|
19151
|
-
isError:
|
|
19146
|
+
event: Type15.Literal("tool_execution_end"),
|
|
19147
|
+
isError: Type15.Boolean()
|
|
19152
19148
|
}, { additionalProperties: true })
|
|
19153
19149
|
]);
|
|
19154
19150
|
function validateToolExecutionObservationRecord(record4) {
|
|
@@ -19242,10 +19238,10 @@ init_engine_detour();
|
|
|
19242
19238
|
|
|
19243
19239
|
// src/engine-detour-tool.ts
|
|
19244
19240
|
init_engine_detour();
|
|
19245
|
-
import { Type as
|
|
19246
|
-
var engineDetourArgsSchema =
|
|
19241
|
+
import { Type as Type16 } from "typebox";
|
|
19242
|
+
var engineDetourArgsSchema = Type16.Object(
|
|
19247
19243
|
{
|
|
19248
|
-
argv:
|
|
19244
|
+
argv: Type16.Array(Type16.String({ minLength: 1 }), {
|
|
19249
19245
|
minItems: 1,
|
|
19250
19246
|
description: "\u9996\u9879\u4E3A PATH \u4E2D\u7684\u53EF\u6267\u884C\u6587\u4EF6\uFF0C\u5176\u4F59\u9879\u4E3A\u53C2\u6570\u3002"
|
|
19251
19247
|
})
|
|
@@ -19356,63 +19352,63 @@ init_activation_ledger_topology();
|
|
|
19356
19352
|
// src/collector-tool-schemas.ts
|
|
19357
19353
|
init_open_tool_schema();
|
|
19358
19354
|
init_terminating_infrastructure();
|
|
19359
|
-
import { Type as
|
|
19360
|
-
var collectorObserveArgsSchema =
|
|
19361
|
-
var collectorRequestArgsSchema =
|
|
19362
|
-
requestId:
|
|
19355
|
+
import { Type as Type17 } from "typebox";
|
|
19356
|
+
var collectorObserveArgsSchema = Type17.Object({}, { additionalProperties: true });
|
|
19357
|
+
var collectorRequestArgsSchema = Type17.Object({
|
|
19358
|
+
requestId: Type17.String({
|
|
19363
19359
|
minLength: 1,
|
|
19364
19360
|
description: "\u8BF7\u6C42\u8EAB\u4EFD\uFF08\u914D\u7F6E id \u6216\u89D2\u8272\u5224\u5B9A\u7684\u7A33\u5B9A id\uFF1B\u9996\u5C3E\u65E0\u7A7A\u767D\uFF09"
|
|
19365
19361
|
}),
|
|
19366
|
-
snapshotId:
|
|
19362
|
+
snapshotId: Type17.String({ minLength: 1, description: "\u6700\u65B0\u7559\u5B58\u89C2\u5BDF\u5FEB\u7167" }),
|
|
19367
19363
|
// #836 r16 class 3: body.minLength deleted — manifest-configured requestId
|
|
19368
19364
|
// ignores body, and the unknown-requestId non-empty condition is a real
|
|
19369
19365
|
// branch in src/collector-ledger.ts:922-951, not a provider shape gate.
|
|
19370
|
-
body:
|
|
19366
|
+
body: Type17.Optional(Type17.String({
|
|
19371
19367
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u8BF7\u6C42\u6B63\u6587\uFF1Brequest-manifest \u672A\u6536\u5F55\u8BE5 requestId \u65F6\u5FC5\u586B"
|
|
19372
19368
|
}))
|
|
19373
19369
|
}, { additionalProperties: true });
|
|
19374
19370
|
var COLLECTOR_HANDBOOK_MAX_BYTES = 64 * 1024;
|
|
19375
|
-
var collectorHandbookWriteArgsSchema =
|
|
19376
|
-
scope:
|
|
19377
|
-
|
|
19378
|
-
|
|
19371
|
+
var collectorHandbookWriteArgsSchema = Type17.Object({
|
|
19372
|
+
scope: Type17.Union([
|
|
19373
|
+
Type17.Literal("general"),
|
|
19374
|
+
Type17.Literal("repo")
|
|
19379
19375
|
], { description: "general\uFF1D\u901A\u7528\u624B\u518C\uFF1Brepo\uFF1D\u5F53\u524D\u4ED3\u5E93\u5DEE\u5F02" }),
|
|
19380
|
-
body:
|
|
19376
|
+
body: Type17.String({
|
|
19381
19377
|
description: `\u624B\u518C\u5168\u6587\uFF08opaque \u5DE5\u4F5C\u8BB0\u5FC6\uFF1B\u6574\u4EFD\u66FF\u6362\uFF1BUTF-8 \u81F3\u591A ${COLLECTOR_HANDBOOK_MAX_BYTES} \u5B57\u8282\uFF09`
|
|
19382
19378
|
})
|
|
19383
19379
|
}, { additionalProperties: true });
|
|
19384
|
-
var collectorReadArgsSchema =
|
|
19385
|
-
evidenceId:
|
|
19380
|
+
var collectorReadArgsSchema = Type17.Object({
|
|
19381
|
+
evidenceId: Type17.String({ minLength: 1, description: "observe \u8FD4\u56DE\u7684\u6750\u6599\u8BC1\u636E id\uFF08evidenceId\uFF09" })
|
|
19386
19382
|
}, { additionalProperties: true });
|
|
19387
|
-
var collectorWaitArgsSchema =
|
|
19388
|
-
durationMs:
|
|
19383
|
+
var collectorWaitArgsSchema = Type17.Object({
|
|
19384
|
+
durationMs: Type17.Integer({
|
|
19389
19385
|
minimum: 1,
|
|
19390
19386
|
description: "\u7B49\u5F85\u6BEB\u79D2\uFF1B\u5B9E\u9645\u7761\u7720\u4E0D\u8D85\u8FC7\u5269\u4F59\u7B49\u5F85\u7A97\uFF08#678\uFF1B\u65E0\u5305\u5185\u5355\u6B21\u4EFB\u610F\u4E0A\u9650\uFF09"
|
|
19391
19387
|
})
|
|
19392
19388
|
}, { additionalProperties: true });
|
|
19393
|
-
var collectorOpenWaitWindowArgsSchema =
|
|
19394
|
-
startedAt:
|
|
19389
|
+
var collectorOpenWaitWindowArgsSchema = Type17.Object({
|
|
19390
|
+
startedAt: Type17.Optional(Type17.String({
|
|
19395
19391
|
description: "\u7B49\u5F85\u7A97\u8D77\u70B9 ISO \u65F6\u95F4\uFF1B\u65B0\u5EFA PR \u7528\u521B\u5EFA\u6210\u529F\u65F6\u523B\uFF1B\u7701\u7565\uFF1D\u73B0\u5728\uFF08\u89E6\u53D1\u9636\u6BB5\u7ED3\u675F\uFF09"
|
|
19396
19392
|
}))
|
|
19397
19393
|
}, { additionalProperties: true });
|
|
19398
|
-
var collectorBindTargetArgsSchema =
|
|
19399
|
-
prNumber:
|
|
19394
|
+
var collectorBindTargetArgsSchema = Type17.Object({
|
|
19395
|
+
prNumber: Type17.Optional(Type17.Unknown({
|
|
19400
19396
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u672C\u4ED3 PR \u53F7\uFF08\u6B63\u6574\u6570\uFF09\u3002\u4E0E issueNumber \u4E8C\u9009\u4E00\u6216\u540C\u6307\u552F\u4E00\u76EE\u6807\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
19401
19397
|
})),
|
|
19402
|
-
issueNumber:
|
|
19398
|
+
issueNumber: Type17.Optional(Type17.Unknown({
|
|
19403
19399
|
description: "\u89D2\u8272\u5224\u5B9A\u7684\u672C\u4ED3 issue \u53F7\uFF08\u6B63\u6574\u6570\uFF09\uFF1Bruntime \u7ECF\u7EBF\u4E0A\u5173\u8054\u89E3\u6790\u552F\u4E00 PR\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
19404
19400
|
}))
|
|
19405
19401
|
}, { additionalProperties: true });
|
|
19406
19402
|
var collectorFindingItemDeclaration = (() => {
|
|
19407
|
-
const item =
|
|
19403
|
+
const item = Type17.Object(
|
|
19408
19404
|
{
|
|
19409
|
-
evidenceId:
|
|
19405
|
+
evidenceId: Type17.Unknown({
|
|
19410
19406
|
description: "observe \u8FD4\u56DE\u7684\u6750\u6599\u6307\u9488\uFF08\u5FC5\u586B\u8BED\u4E49\uFF09"
|
|
19411
19407
|
}),
|
|
19412
|
-
category:
|
|
19408
|
+
category: Type17.Unknown({
|
|
19413
19409
|
description: "\u7B80\u77ED\u5F52\u7C7B\u6807\u7B7E\uFF0C\u4E0D\u662F\u6458\u8981"
|
|
19414
19410
|
}),
|
|
19415
|
-
summary:
|
|
19411
|
+
summary: Type17.Unknown({
|
|
19416
19412
|
description: "\u54EA\u4E2A bot\u3001\u4EC0\u4E48\u95EE\u9898\u7684\u6458\u8981\uFF1B\u4E0D\u8A8A\u6284\u6B63\u6587"
|
|
19417
19413
|
})
|
|
19418
19414
|
},
|
|
@@ -19425,14 +19421,14 @@ var collectorFindingItemDeclaration = (() => {
|
|
|
19425
19421
|
return item;
|
|
19426
19422
|
})();
|
|
19427
19423
|
var collectorOutputBaseSchema = openToolObject(
|
|
19428
|
-
|
|
19424
|
+
Type17.Object({
|
|
19429
19425
|
// No root type:array — host must not shape-reject non-array findings (#676 C).
|
|
19430
19426
|
// Nested item declarations ride `items` for registration preservation (ADR 0057).
|
|
19431
|
-
findings:
|
|
19427
|
+
findings: Type17.Unsafe({
|
|
19432
19428
|
description: "\u672C\u6B21\u6536\u96C6\u5230\u7684\u9010\u6761 findings\uFF08\u6307\u9488\u6570\u7EC4\u4E3A\u89C4\u8303\u5F62\uFF09\u3002\u96F6 finding \u7684\u6A21\u677F\u901A\u77E5\u4E0D\u5F97\u8FDB\u5165\uFF1B\u6B63\u5E38\u5B8C\u5DE5\u65E0 finding \u65F6\u7701\u7565\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002",
|
|
19433
19429
|
items: collectorFindingItemDeclaration
|
|
19434
19430
|
}),
|
|
19435
|
-
unfinishedReasons:
|
|
19431
|
+
unfinishedReasons: Type17.Unknown({
|
|
19436
19432
|
description: "\u672A\u5B8C\u6210\u539F\u56E0\u5B57\u7B26\u4E32\u6570\u7EC4\uFF08\u989D\u5EA6/\u6545\u969C/\u7B49\u5F85\u5C4A\u6EE1\u7B49\u73B0\u573A\u4F9D\u636E\uFF09\uFF1B\u4E0D\u5F97\u628A\u672A\u5B8C\u6210\u8868\u8FF0\u4E3A\u65E0\u95EE\u9898\u3002\u65E0\u53EF\u62A5\u544A\u65F6\u7701\u7565\u3002\u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\u3002"
|
|
19437
19433
|
})
|
|
19438
19434
|
})
|
|
@@ -20283,24 +20279,24 @@ init_notary_contracts();
|
|
|
20283
20279
|
init_terminating_infrastructure();
|
|
20284
20280
|
init_countersign_contracts();
|
|
20285
20281
|
init_countersign_contracts();
|
|
20286
|
-
import { Type as
|
|
20282
|
+
import { Type as Type18 } from "typebox";
|
|
20287
20283
|
var countersignVerdictSchema = withInfrastructureFailureDeclaration(
|
|
20288
|
-
|
|
20284
|
+
Type18.Object(
|
|
20289
20285
|
{
|
|
20290
|
-
countersignStatus:
|
|
20291
|
-
fix:
|
|
20292
|
-
|
|
20293
|
-
{ summary:
|
|
20286
|
+
countersignStatus: Type18.Unknown({ description: "converged | continue | escalate\u3002\u975E\u4E09\u6001\u65F6\u8BF7\u91CD\u8BFB\u540E\u91CD\u4EA4\uFF0C\u52FF\u6539\u6807\u3002" }),
|
|
20287
|
+
fix: Type18.Optional(
|
|
20288
|
+
Type18.Object(
|
|
20289
|
+
{ summary: Type18.Optional(Type18.String({ description: "\u9000\u56DE\u6458\u8981" })) },
|
|
20294
20290
|
{ additionalProperties: true, description: "\u9000\u56DE\u8BF4\u660E" }
|
|
20295
20291
|
)
|
|
20296
20292
|
),
|
|
20297
|
-
note:
|
|
20298
|
-
evidence:
|
|
20299
|
-
decisionGate:
|
|
20300
|
-
|
|
20293
|
+
note: Type18.Optional(Type18.String({ description: "\u9644\u6CE8" })),
|
|
20294
|
+
evidence: Type18.Optional(Type18.Unknown({ description: "\u7559\u5B58\u8BC1\u636E" })),
|
|
20295
|
+
decisionGate: Type18.Optional(
|
|
20296
|
+
Type18.Object(
|
|
20301
20297
|
{
|
|
20302
|
-
question:
|
|
20303
|
-
options:
|
|
20298
|
+
question: Type18.Optional(Type18.String()),
|
|
20299
|
+
options: Type18.Optional(Type18.Array(Type18.String()))
|
|
20304
20300
|
},
|
|
20305
20301
|
{ additionalProperties: true, description: "\u9700\u965B\u4E0B\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879" }
|
|
20306
20302
|
)
|
|
@@ -20326,18 +20322,18 @@ init_open_tool_schema();
|
|
|
20326
20322
|
init_terminating_infrastructure();
|
|
20327
20323
|
init_gleaner_left_contracts();
|
|
20328
20324
|
init_gleaner_left_contracts();
|
|
20329
|
-
import { Type as
|
|
20325
|
+
import { Type as Type19 } from "typebox";
|
|
20330
20326
|
var gleanerLeftOutputSchema = withInfrastructureFailureDeclaration(
|
|
20331
20327
|
openToolObject(
|
|
20332
|
-
|
|
20333
|
-
status:
|
|
20328
|
+
Type19.Object({
|
|
20329
|
+
status: Type19.Unknown({
|
|
20334
20330
|
description: "completed \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
20335
20331
|
}),
|
|
20336
|
-
findings:
|
|
20337
|
-
|
|
20332
|
+
findings: Type19.Array(
|
|
20333
|
+
Type19.Object(
|
|
20338
20334
|
{
|
|
20339
|
-
pointer:
|
|
20340
|
-
statement:
|
|
20335
|
+
pointer: Type19.Optional(Type19.String({ description: "\u6587\u4EF6/\u884C\u6307\u9488" })),
|
|
20336
|
+
statement: Type19.Optional(Type19.String({ description: "\u7591\u70B9\u9648\u8FF0" }))
|
|
20341
20337
|
},
|
|
20342
20338
|
{ additionalProperties: true, description: "\u4E00\u6761\u5F39\u7AE0" }
|
|
20343
20339
|
),
|
|
@@ -20361,17 +20357,17 @@ init_gleaner_left_contracts();
|
|
|
20361
20357
|
init_open_tool_schema();
|
|
20362
20358
|
init_terminating_infrastructure();
|
|
20363
20359
|
init_inspector_contracts();
|
|
20364
|
-
import { Type as
|
|
20360
|
+
import { Type as Type20 } from "typebox";
|
|
20365
20361
|
var inspectorOutputSchema = withInfrastructureFailureDeclaration(
|
|
20366
20362
|
openToolObject(
|
|
20367
|
-
|
|
20368
|
-
status:
|
|
20363
|
+
Type20.Object({
|
|
20364
|
+
status: Type20.Unknown({
|
|
20369
20365
|
description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
20370
20366
|
}),
|
|
20371
|
-
findings:
|
|
20367
|
+
findings: Type20.Unknown({
|
|
20372
20368
|
description: "\u968F\u4EA4\u5377\u7559\u5B58\u7684\u95EE\u9898\u8BB0\u5F55"
|
|
20373
20369
|
}),
|
|
20374
|
-
reason:
|
|
20370
|
+
reason: Type20.Optional(Type20.Unknown({
|
|
20375
20371
|
description: "status \u4E3A escalate \u65F6\u7684\u4E0A\u5448\u7406\u7531"
|
|
20376
20372
|
}))
|
|
20377
20373
|
})
|
|
@@ -20393,45 +20389,45 @@ init_open_tool_schema();
|
|
|
20393
20389
|
init_terminating_infrastructure();
|
|
20394
20390
|
init_diarist_contracts();
|
|
20395
20391
|
init_diarist_contracts();
|
|
20396
|
-
import { Type as
|
|
20392
|
+
import { Type as Type21 } from "typebox";
|
|
20397
20393
|
var diaristOutputSchema = withInfrastructureFailureDeclaration(
|
|
20398
20394
|
openToolObject(
|
|
20399
|
-
|
|
20400
|
-
status:
|
|
20395
|
+
Type21.Object({
|
|
20396
|
+
status: Type21.Unknown({
|
|
20401
20397
|
description: "completed | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8"
|
|
20402
20398
|
}),
|
|
20403
|
-
ticketNumber:
|
|
20404
|
-
|
|
20399
|
+
ticketNumber: Type21.Optional(
|
|
20400
|
+
Type21.Unknown({
|
|
20405
20401
|
description: "\u672C\u5EAD\u5BF9\u8C61\u7968\u53F7\uFF08\u6B63\u6574\u6570\uFF09\u6216 null/\u7701\u7565\uFF1D\u771F\u65E0\u7968\uFF1B\u4E0B\u6E38\u8D70 typed \u952E\uFF1B\u8BA4\u4E0D\u51FA\u7528 status=escalate\uFF0C\u4E0D\u6D17\u6210\u65E0\u5F55\u3002\u673A\u68B0\u5C42\u4E0D\u91CD\u5224\u3002"
|
|
20406
20402
|
})
|
|
20407
20403
|
),
|
|
20408
|
-
reason:
|
|
20409
|
-
|
|
20404
|
+
reason: Type21.Optional(
|
|
20405
|
+
Type21.String({
|
|
20410
20406
|
description: "status \u4E3A escalate \u65F6\uFF1A\u8BA4\u4E0D\u51FA\u672C\u5EAD\u5BF9\u8C61\u7684\u539F\u56E0"
|
|
20411
20407
|
})
|
|
20412
20408
|
),
|
|
20413
|
-
entries:
|
|
20414
|
-
|
|
20415
|
-
|
|
20409
|
+
entries: Type21.Optional(
|
|
20410
|
+
Type21.Array(
|
|
20411
|
+
Type21.Object(
|
|
20416
20412
|
{
|
|
20417
|
-
sourceKind:
|
|
20413
|
+
sourceKind: Type21.Optional(Type21.String({
|
|
20418
20414
|
description: "\u6765\u6E90\u65CF\uFF1Acc-session | issue-body-comment | adr-decision-key | ticket-decree-block"
|
|
20419
20415
|
})),
|
|
20420
|
-
sourceRef:
|
|
20416
|
+
sourceRef: Type21.Optional(Type21.Object(
|
|
20421
20417
|
{
|
|
20422
|
-
sessionFile:
|
|
20423
|
-
entryId:
|
|
20424
|
-
path:
|
|
20425
|
-
url:
|
|
20418
|
+
sessionFile: Type21.Optional(Type21.String()),
|
|
20419
|
+
entryId: Type21.Optional(Type21.Unknown()),
|
|
20420
|
+
path: Type21.Optional(Type21.String()),
|
|
20421
|
+
url: Type21.Optional(Type21.String())
|
|
20426
20422
|
},
|
|
20427
20423
|
{ additionalProperties: true, description: "\u4E0D\u53EF\u53D8\u6E90\u6307\u9488" }
|
|
20428
20424
|
)),
|
|
20429
|
-
transcript:
|
|
20425
|
+
transcript: Type21.Optional(Type21.String({
|
|
20430
20426
|
description: "\u6574\u5757\u539F\u6587\uFF08\u8A8A\u5F55\u6574\u5757\uFF0C\u4E0D\u6307\u9488\u5316\uFF09"
|
|
20431
20427
|
})),
|
|
20432
|
-
timestamp:
|
|
20433
|
-
note:
|
|
20434
|
-
|
|
20428
|
+
timestamp: Type21.Optional(Type21.String({ description: "\u6E90\u65F6\u95F4\u6233 ISO" })),
|
|
20429
|
+
note: Type21.Optional(
|
|
20430
|
+
Type21.String({ description: "\u8BE5\u6750\u6599\u4E0E\u672C\u6848\u7684\u5173\u7CFB\uFF08\u4EBA\u8BFB\uFF09" })
|
|
20435
20431
|
)
|
|
20436
20432
|
},
|
|
20437
20433
|
{ additionalProperties: true, description: "\u4E00\u6761\u5165\u5F55\u6574\u5757" }
|
|
@@ -20531,32 +20527,32 @@ init_audit_escalation();
|
|
|
20531
20527
|
init_terminating_infrastructure();
|
|
20532
20528
|
init_submission_errors();
|
|
20533
20529
|
init_judge_output();
|
|
20534
|
-
import { Type as
|
|
20530
|
+
import { Type as Type22 } from "typebox";
|
|
20535
20531
|
var JUDGE_QUEUE_STATUSES = /* @__PURE__ */ new Set(["converged", "continue", "escalate"]);
|
|
20536
20532
|
var JUDGE_STATUS_REASK = "judgeStatus \u4E0D\u662F converged\u3001continue\u3001escalate \u4E09\u6001\u4E4B\u4E00\u3002\u8BF7\u91CD\u65B0\u4EA4\u5377\uFF0Cstatus \u5199\u660E\u5176\u4E00\u3002";
|
|
20537
20533
|
var judgeVerdictSchema = withInfrastructureFailureDeclaration(
|
|
20538
|
-
|
|
20534
|
+
Type22.Object(
|
|
20539
20535
|
{
|
|
20540
|
-
judgeStatus:
|
|
20541
|
-
fix:
|
|
20542
|
-
|
|
20543
|
-
{ summary:
|
|
20536
|
+
judgeStatus: Type22.Unknown({ description: "converged | continue | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }),
|
|
20537
|
+
fix: Type22.Optional(
|
|
20538
|
+
Type22.Object(
|
|
20539
|
+
{ summary: Type22.Optional(Type22.String({ description: "continue \u65F6\u7684\u8865\u6551\u6458\u8981" })) },
|
|
20544
20540
|
{ additionalProperties: true, description: "continue \u65F6\u7684\u8865\u6551\u8BF4\u660E" }
|
|
20545
20541
|
)
|
|
20546
20542
|
),
|
|
20547
|
-
classes:
|
|
20548
|
-
name:
|
|
20549
|
-
owner:
|
|
20550
|
-
boundary:
|
|
20551
|
-
disposition:
|
|
20543
|
+
classes: Type22.Optional(Type22.Array(Type22.Object({
|
|
20544
|
+
name: Type22.Optional(Type22.String()),
|
|
20545
|
+
owner: Type22.Optional(Type22.String()),
|
|
20546
|
+
boundary: Type22.Optional(Type22.String()),
|
|
20547
|
+
disposition: Type22.Optional(Type22.String())
|
|
20552
20548
|
}, { additionalProperties: true }), { description: "\u5DF2\u88C1\u51B3 finding \u7C7B\u53CA\u5176 owner \u4E0E\u4FEE\u7406\u8FB9\u754C" })),
|
|
20553
|
-
note:
|
|
20554
|
-
evidence:
|
|
20555
|
-
decisionGate:
|
|
20556
|
-
|
|
20549
|
+
note: Type22.Optional(Type22.String({ description: "\u53EF\u9009\u88C1\u51B3\u9644\u6CE8" })),
|
|
20550
|
+
evidence: Type22.Optional(Type22.Unknown({ description: "\u7559\u5B58\u7684\u88C1\u51B3\u8BC1\u636E" })),
|
|
20551
|
+
decisionGate: Type22.Optional(
|
|
20552
|
+
Type22.Object(
|
|
20557
20553
|
{
|
|
20558
|
-
question:
|
|
20559
|
-
options:
|
|
20554
|
+
question: Type22.Optional(Type22.String()),
|
|
20555
|
+
options: Type22.Optional(Type22.Array(Type22.String()))
|
|
20560
20556
|
},
|
|
20561
20557
|
{ additionalProperties: true, description: "\u9700\u4EBA\u6743\u5A01\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879" }
|
|
20562
20558
|
)
|
|
@@ -20640,21 +20636,21 @@ init_open_tool_schema();
|
|
|
20640
20636
|
init_terminating_infrastructure();
|
|
20641
20637
|
init_reviewer_pinned_git();
|
|
20642
20638
|
init_reviewer_output();
|
|
20643
|
-
import { Type as
|
|
20644
|
-
var reviewerAmendmentsSchema =
|
|
20645
|
-
standards:
|
|
20646
|
-
spec:
|
|
20639
|
+
import { Type as Type23 } from "typebox";
|
|
20640
|
+
var reviewerAmendmentsSchema = Type23.Object({
|
|
20641
|
+
standards: Type23.Optional(Type23.String({ description: "\u76F8\u5BF9 Standards \u5B50\u62A5\u544A\u7684\u589E\u91CF\uFF1A\u589E finding\u3001\u64A4\u56DE\u6216\u4E8B\u5B9E\u66F4\u6B63" })),
|
|
20642
|
+
spec: Type23.Optional(Type23.String({ description: "\u76F8\u5BF9 Spec \u5B50\u62A5\u544A\u7684\u589E\u91CF\uFF1A\u589E finding\u3001\u64A4\u56DE\u6216\u4E8B\u5B9E\u66F4\u6B63" }))
|
|
20647
20643
|
}, { additionalProperties: true, description: "\u76F8\u5BF9\u5B50\u62A5\u544A\u7684\u53EF\u9009\u8F74\u589E\u91CF\uFF1B\u975E\u66FF\u4EE3\u62A5\u544A\u3002\u65E0\u589E\u91CF\u7684\u8F74\u53EF\u7701\u7565\u3002" });
|
|
20648
20644
|
var REVIEWER_STATUS_DESCRIPTION = "completed | refused \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8";
|
|
20649
|
-
var reviewerOutputVariants =
|
|
20650
|
-
|
|
20651
|
-
status:
|
|
20652
|
-
amendments:
|
|
20645
|
+
var reviewerOutputVariants = Type23.Union([
|
|
20646
|
+
Type23.Object({
|
|
20647
|
+
status: Type23.Unknown({ description: REVIEWER_STATUS_DESCRIPTION }),
|
|
20648
|
+
amendments: Type23.Optional(reviewerAmendmentsSchema)
|
|
20653
20649
|
}, { additionalProperties: false }),
|
|
20654
|
-
|
|
20655
|
-
status:
|
|
20656
|
-
diagnostic:
|
|
20657
|
-
amendments:
|
|
20650
|
+
Type23.Object({
|
|
20651
|
+
status: Type23.Unknown({ description: REVIEWER_STATUS_DESCRIPTION }),
|
|
20652
|
+
diagnostic: Type23.String({ description: "\u62D2\u7EDD\u8BCA\u65AD\u8BF4\u660E" }),
|
|
20653
|
+
amendments: Type23.Optional(reviewerAmendmentsSchema)
|
|
20658
20654
|
}, { additionalProperties: false })
|
|
20659
20655
|
]);
|
|
20660
20656
|
var reviewerOutputSchema = withInfrastructureFailureDeclaration(
|
|
@@ -20710,7 +20706,7 @@ init_submission_correctable_error();
|
|
|
20710
20706
|
init_worker_output();
|
|
20711
20707
|
init_fixer_output();
|
|
20712
20708
|
init_fixer_packet();
|
|
20713
|
-
import { Type as
|
|
20709
|
+
import { Type as Type24 } from "typebox";
|
|
20714
20710
|
|
|
20715
20711
|
// src/worker-submission-gates.ts
|
|
20716
20712
|
init_archivist_record_entry();
|
|
@@ -20975,20 +20971,20 @@ function fixerBashSeatbeltDenyReason(matched) {
|
|
|
20975
20971
|
|
|
20976
20972
|
// src/worker-role.ts
|
|
20977
20973
|
var CODER_STATUS_DESCRIPTION = "planned | completed | refused | unfinished \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8\uFF1Bcompleted \u56DE\u6267\u542B TDD\u3001\u540C\u6A21\u5F0F\u3001\u5F15\u5165\u56DE\u5F52\u3001\u884C\u4E3A\u4E8B\u5B9E\u56DB\u9879\u8BC1\u636E\uFF1Bunfinished \u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u81F4\u672C\u5C40\u672A\u5B8C\u6210\u65F6\u53EF\u7528\uFF0C\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002";
|
|
20978
|
-
var coderOutputVariants =
|
|
20979
|
-
|
|
20980
|
-
status:
|
|
20981
|
-
report:
|
|
20974
|
+
var coderOutputVariants = Type24.Union([
|
|
20975
|
+
Type24.Object({
|
|
20976
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20977
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" })
|
|
20982
20978
|
}, { additionalProperties: false }),
|
|
20983
|
-
|
|
20984
|
-
status:
|
|
20985
|
-
report:
|
|
20979
|
+
Type24.Object({
|
|
20980
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20981
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" })
|
|
20986
20982
|
}, { additionalProperties: false }),
|
|
20987
|
-
|
|
20988
|
-
status:
|
|
20989
|
-
report:
|
|
20990
|
-
remainingScope:
|
|
20991
|
-
reason:
|
|
20983
|
+
Type24.Object({
|
|
20984
|
+
status: Type24.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
20985
|
+
report: Type24.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
20986
|
+
remainingScope: Type24.String({ description: "\u672C\u5C40\u540E\u5269\u4F59\u5DE5\u4F5C" }),
|
|
20987
|
+
reason: Type24.Optional(Type24.String({
|
|
20992
20988
|
minLength: 1,
|
|
20993
20989
|
description: "\u963B\u65AD\u539F\u56E0\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u3002\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002"
|
|
20994
20990
|
}))
|
package/dist/public-cli/main.js
CHANGED
|
@@ -22379,16 +22379,12 @@ var init_gatekeeper_role = __esm({
|
|
|
22379
22379
|
});
|
|
22380
22380
|
|
|
22381
22381
|
// src/compliance-transport.ts
|
|
22382
|
-
var
|
|
22382
|
+
var AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE, AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE;
|
|
22383
22383
|
var init_compliance_transport = __esm({
|
|
22384
22384
|
"src/compliance-transport.ts"() {
|
|
22385
22385
|
"use strict";
|
|
22386
|
-
init_build();
|
|
22387
22386
|
init_auditor_dossier_tool();
|
|
22388
22387
|
init_gatekeeper_role();
|
|
22389
|
-
nonblank2 = typebox_exports.String({ minLength: 1, pattern: "\\S" });
|
|
22390
|
-
decisionGateSchema = typebox_exports.Object({ question: nonblank2, options: typebox_exports.Array(nonblank2, { minItems: 1 }) }, { additionalProperties: false });
|
|
22391
|
-
complianceDecisionSchema = typebox_exports.Object({ status: typebox_exports.Unknown({ description: "pass | bounce | escalate \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8" }), violations: typebox_exports.Array(nonblank2, { description: "\u89C2\u5BDF\u5230\u7684\u5408\u89C4\u8FDD\u89C4" }), conflicts: typebox_exports.Array(nonblank2, { description: "\u672A\u51B3\u6743\u5A01\u6216\u6267\u884C\u51B2\u7A81" }), decisionGate: typebox_exports.Union([decisionGateSchema, typebox_exports.Null()], { description: "\u5347\u7EA7\u95EE\u9898\u4E0E\u53EF\u9009\u9009\u9879" }) }, { additionalProperties: true, required: [] });
|
|
22392
22388
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
22393
22389
|
AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure";
|
|
22394
22390
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Usage } from "@earendil-works/pi-ai";
|
|
2
|
-
import { Type } from "typebox";
|
|
3
2
|
import type { AuditorSoulRole } from "./auditor-soul.ts";
|
|
4
3
|
import { auditorRunDirectory } from "./auditor-dossier-tool.ts";
|
|
5
4
|
import type { HostContext } from "./host-contracts.ts";
|
|
@@ -37,10 +36,6 @@ export type ComplianceDecision =
|
|
|
37
36
|
/** Zero-projection kickoff — soul already carries dossier-fetch duty; no hand-delivered materials. */
|
|
38
37
|
export const AUDITOR_DOSSIER_PROMPT = "卷宗指针:" as const;
|
|
39
38
|
|
|
40
|
-
const nonblank = Type.String({ minLength: 1, pattern: "\\S" });
|
|
41
|
-
const decisionGateSchema = Type.Object({ question: nonblank, options: Type.Array(nonblank, { minItems: 1 }) }, { additionalProperties: false });
|
|
42
|
-
export const complianceDecisionSchema = Type.Object({ status: Type.Unknown({ description: "pass | bounce | escalate — 形状指引,非 schema 闸" }), violations: Type.Array(nonblank, { description: "观察到的合规违规" }), conflicts: Type.Array(nonblank, { description: "未决权威或执行冲突" }), decisionGate: Type.Union([decisionGateSchema, Type.Null()], { description: "升级问题与可选选项" }) }, { additionalProperties: true, required: [] });
|
|
43
|
-
|
|
44
39
|
export const COMPLIANCE_RESPONSE_ENTRY_TYPE = "ak_compliance_response" as const;
|
|
45
40
|
export const AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding" as const;
|
|
46
41
|
export const AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure" as const;
|