nexus-agents 6.3.15 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-U4YGR5BI.js → chunk-46XUGUB4.js} +3 -3
- package/dist/{chunk-LCPMVQTQ.js → chunk-6SA3FIBZ.js} +2 -2
- package/dist/{chunk-TAC3HDZP.js → chunk-K3ZTZSLW.js} +2 -2
- package/dist/chunk-OXJEIMLS.js +7 -0
- package/dist/{chunk-5QUPQZJ7.js.map → chunk-OXJEIMLS.js.map} +1 -1
- package/dist/{chunk-BQNXEFYU.js → chunk-WMXHD6UA.js} +42 -8
- package/dist/{chunk-BQNXEFYU.js.map → chunk-WMXHD6UA.js.map} +1 -1
- package/dist/{chunk-5NEA63UC.js → chunk-XF6J4PCH.js} +139 -60
- package/dist/chunk-XF6J4PCH.js.map +1 -0
- package/dist/cli.js +11 -10
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-A65EDXPT.js → consensus-vote-ZMEESJFP.js} +4 -4
- package/dist/{improvement-review-JZTEJOWQ.js → improvement-review-PUEF3WL4.js} +4 -4
- package/dist/index.d.ts +101 -14
- package/dist/index.js +7 -7
- package/dist/{setup-data-dir-XRJNMTQV.js → setup-data-dir-3MPQZUHC.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-5NEA63UC.js.map +0 -1
- package/dist/chunk-5QUPQZJ7.js +0 -7
- /package/dist/{chunk-U4YGR5BI.js.map → chunk-46XUGUB4.js.map} +0 -0
- /package/dist/{chunk-LCPMVQTQ.js.map → chunk-6SA3FIBZ.js.map} +0 -0
- /package/dist/{chunk-TAC3HDZP.js.map → chunk-K3ZTZSLW.js.map} +0 -0
- /package/dist/{consensus-vote-A65EDXPT.js.map → consensus-vote-ZMEESJFP.js.map} +0 -0
- /package/dist/{improvement-review-JZTEJOWQ.js.map → improvement-review-PUEF3WL4.js.map} +0 -0
- /package/dist/{setup-data-dir-XRJNMTQV.js.map → setup-data-dir-3MPQZUHC.js.map} +0 -0
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
resetCorrelationTracker,
|
|
12
12
|
runConsensusForGoal,
|
|
13
13
|
unwrapVoteOrThrow
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K3ZTZSLW.js";
|
|
15
15
|
import "./chunk-JC4WREXA.js";
|
|
16
16
|
import "./chunk-OQB3XC5O.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-XF6J4PCH.js";
|
|
18
|
+
import "./chunk-OXJEIMLS.js";
|
|
19
19
|
import "./chunk-DR7DYEFQ.js";
|
|
20
20
|
import "./chunk-KXQNETUB.js";
|
|
21
21
|
import "./chunk-DXIZQRP5.js";
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
runConsensusForGoal,
|
|
51
51
|
unwrapVoteOrThrow
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=consensus-vote-
|
|
53
|
+
//# sourceMappingURL=consensus-vote-ZMEESJFP.js.map
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
loadSelfEvalSignals,
|
|
12
12
|
registerImprovementReviewTool,
|
|
13
13
|
runImprovementReview
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-6SA3FIBZ.js";
|
|
15
|
+
import "./chunk-XF6J4PCH.js";
|
|
16
|
+
import "./chunk-OXJEIMLS.js";
|
|
17
17
|
import "./chunk-DR7DYEFQ.js";
|
|
18
18
|
import "./chunk-UOHOHH72.js";
|
|
19
19
|
import "./chunk-GBHJ37V3.js";
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
registerImprovementReviewTool,
|
|
34
34
|
runImprovementReview
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=improvement-review-
|
|
36
|
+
//# sourceMappingURL=improvement-review-PUEF3WL4.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -18495,6 +18495,21 @@ interface PolicyDecision$2 {
|
|
|
18495
18495
|
readonly reason: string;
|
|
18496
18496
|
readonly requiredArtifact?: string;
|
|
18497
18497
|
readonly ruleName?: string;
|
|
18498
|
+
/**
|
|
18499
|
+
* A rule denied this call and warn mode overrode the denial, so `allowed` is
|
|
18500
|
+
* `true` but the operation WOULD have been blocked in enforce mode (#4991).
|
|
18501
|
+
*
|
|
18502
|
+
* Set explicitly by the evaluator rather than inferred downstream. The first
|
|
18503
|
+
* implementation deduced it from `allowed === true && ruleName !== undefined`
|
|
18504
|
+
* — true of today's code, because `allowWithReason` never sets `ruleName` —
|
|
18505
|
+
* and a consensus panel rejected that: naming which rule *permitted* an
|
|
18506
|
+
* action (`admin-override` vs `default-allow`) is ordinary access-control
|
|
18507
|
+
* practice, so the day an allow rule sets `ruleName`, every authorized call
|
|
18508
|
+
* it covers would be silently recorded as a near-miss. Deriving a verdict
|
|
18509
|
+
* from the absence of an unrelated field is not a signal, it is a
|
|
18510
|
+
* coincidence.
|
|
18511
|
+
*/
|
|
18512
|
+
readonly overriddenByWarnMode?: boolean;
|
|
18498
18513
|
}
|
|
18499
18514
|
/**
|
|
18500
18515
|
* Context provided to policy rules for evaluation.
|
|
@@ -19068,6 +19083,7 @@ declare const AuditEventSchema: z.ZodObject<{
|
|
|
19068
19083
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19069
19084
|
policyName: z.ZodOptional<z.ZodString>;
|
|
19070
19085
|
policyDecision: z.ZodOptional<z.ZodString>;
|
|
19086
|
+
policyOccurrence: z.ZodOptional<z.ZodNumber>;
|
|
19071
19087
|
violationType: z.ZodOptional<z.ZodString>;
|
|
19072
19088
|
previousHash: z.ZodOptional<z.ZodString>;
|
|
19073
19089
|
hash: z.ZodOptional<z.ZodString>;
|
|
@@ -19125,6 +19141,7 @@ declare const AuditEventInputSchema: z.ZodObject<{
|
|
|
19125
19141
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19126
19142
|
policyName: z.ZodOptional<z.ZodString>;
|
|
19127
19143
|
policyDecision: z.ZodOptional<z.ZodString>;
|
|
19144
|
+
policyOccurrence: z.ZodOptional<z.ZodNumber>;
|
|
19128
19145
|
violationType: z.ZodOptional<z.ZodString>;
|
|
19129
19146
|
}, z.core.$strip>;
|
|
19130
19147
|
type AuditEventInput = z.infer<typeof AuditEventInputSchema>;
|
|
@@ -19157,13 +19174,13 @@ declare const AuditLogConfigSchema: z.ZodObject<{
|
|
|
19157
19174
|
type AuditLogConfig = z.infer<typeof AuditLogConfigSchema>;
|
|
19158
19175
|
interface IAuditStorage {
|
|
19159
19176
|
/** Write an audit event to storage */
|
|
19160
|
-
write(event: AuditEvent$1)
|
|
19177
|
+
write: (event: AuditEvent$1) => Promise<void>;
|
|
19161
19178
|
/** Flush pending writes */
|
|
19162
|
-
flush()
|
|
19179
|
+
flush: () => Promise<void>;
|
|
19163
19180
|
/** Close the storage */
|
|
19164
|
-
close()
|
|
19181
|
+
close: () => Promise<void>;
|
|
19165
19182
|
/** Query events by criteria */
|
|
19166
|
-
query(criteria: AuditQueryCriteria)
|
|
19183
|
+
query: (criteria: AuditQueryCriteria) => Promise<AuditEvent$1[]>;
|
|
19167
19184
|
}
|
|
19168
19185
|
declare const AuditQueryCriteriaSchema: z.ZodObject<{
|
|
19169
19186
|
startTime: z.ZodOptional<z.ZodDate>;
|
|
@@ -19198,23 +19215,59 @@ declare const AuditQueryCriteriaSchema: z.ZodObject<{
|
|
|
19198
19215
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19199
19216
|
}, z.core.$strip>;
|
|
19200
19217
|
type AuditQueryCriteria = z.infer<typeof AuditQueryCriteriaSchema>;
|
|
19218
|
+
/**
|
|
19219
|
+
* Sink for audit records.
|
|
19220
|
+
*
|
|
19221
|
+
* **Every member is declared as a function PROPERTY, not a method, and that is
|
|
19222
|
+
* load-bearing (#4991.)** TypeScript exempts method-shorthand parameters from
|
|
19223
|
+
* `strictFunctionTypes` and checks them bivariantly. When
|
|
19224
|
+
* {@link PolicyAuditDecision} gained `would_deny`, an out-of-tree implementor
|
|
19225
|
+
* still typed against the old two-value union would have kept COMPILING and
|
|
19226
|
+
* then received a value it cannot handle at runtime — silently dropping the
|
|
19227
|
+
* audit record, or throwing inside the authorization path. A major version bump
|
|
19228
|
+
* is a note in a changelog; a property signature is a compile error.
|
|
19229
|
+
*
|
|
19230
|
+
* EVERY member is converted, not just the one whose union widened. (Stated
|
|
19231
|
+
* without a count on purpose: a literal here drifts the moment a member is
|
|
19232
|
+
* added, which is the same doc-accuracy defect this file is fixing elsewhere.
|
|
19233
|
+
* `audit-types-variance.test.ts` asserts the property, whatever the count.) An
|
|
19234
|
+
* earlier revision converted only `logPolicyDecision`, on the reasoning that
|
|
19235
|
+
* touching the others "would break implementors for no reason". That reasoning
|
|
19236
|
+
* was wrong, and a panel caught it: an ES6 class using ordinary method syntax
|
|
19237
|
+
* satisfies a property signature perfectly well, as does an object literal with
|
|
19238
|
+
* method shorthand — the ONLY implementor a property signature rejects is one
|
|
19239
|
+
* whose parameter is *narrower* than declared, which is exactly the unsound
|
|
19240
|
+
* case. Converting one member and leaving six is the dangerous state: it looks
|
|
19241
|
+
* consistent enough to imitate, and the next person to widen a parameter on any
|
|
19242
|
+
* of the other six silently reopens the same hole.
|
|
19243
|
+
*
|
|
19244
|
+
* **Limit, stated because it is real:** contravariant checking requires
|
|
19245
|
+
* `strictFunctionTypes` (implied by `strict`) in the CONSUMER's tsconfig. A
|
|
19246
|
+
* downstream project compiling without it falls back to bivariance, compiles a
|
|
19247
|
+
* stale implementor, and drops `would_deny` records at runtime. That flag is
|
|
19248
|
+
* outside this package's control, so the guarantee here is "strict consumers
|
|
19249
|
+
* get a compile error", not "no consumer can get this wrong".
|
|
19250
|
+
*
|
|
19251
|
+
* Pinned by `audit-types-variance.test.ts`, whose `@ts-expect-error` probe
|
|
19252
|
+
* fails with TS2578 if any of these reverts to method shorthand.
|
|
19253
|
+
*/
|
|
19201
19254
|
interface IAuditLogger {
|
|
19202
19255
|
/** Log an audit event */
|
|
19203
|
-
log(input: AuditEventInput)
|
|
19256
|
+
log: (input: AuditEventInput) => void;
|
|
19204
19257
|
/** Log a tool invocation */
|
|
19205
|
-
logToolInvocation(opts: ToolInvocationAuditOpts)
|
|
19206
|
-
/** Log a policy decision */
|
|
19207
|
-
logPolicyDecision(opts: PolicyDecisionAuditOpts)
|
|
19258
|
+
logToolInvocation: (opts: ToolInvocationAuditOpts) => void;
|
|
19259
|
+
/** Log a policy decision. See the interface note on parameter variance. */
|
|
19260
|
+
logPolicyDecision: (opts: PolicyDecisionAuditOpts) => void;
|
|
19208
19261
|
/** Log a security event */
|
|
19209
|
-
logSecurityEvent(opts: SecurityEventAuditOpts)
|
|
19262
|
+
logSecurityEvent: (opts: SecurityEventAuditOpts) => void;
|
|
19210
19263
|
/** Log a rate limit violation */
|
|
19211
|
-
logRateLimitViolation(opts: RateLimitAuditOpts)
|
|
19264
|
+
logRateLimitViolation: (opts: RateLimitAuditOpts) => void;
|
|
19212
19265
|
/** Log an authority-tier transition (promotion/demotion) — Epic D, #3842. */
|
|
19213
|
-
logTierTransition(opts: TierTransitionAuditOpts)
|
|
19266
|
+
logTierTransition: (opts: TierTransitionAuditOpts) => void;
|
|
19214
19267
|
/** Flush pending events */
|
|
19215
|
-
flush()
|
|
19268
|
+
flush: () => Promise<void>;
|
|
19216
19269
|
/** Close the logger */
|
|
19217
|
-
close()
|
|
19270
|
+
close: () => Promise<void>;
|
|
19218
19271
|
}
|
|
19219
19272
|
interface ToolInvocationAuditOpts {
|
|
19220
19273
|
toolName: string;
|
|
@@ -19224,15 +19277,49 @@ interface ToolInvocationAuditOpts {
|
|
|
19224
19277
|
durationMs?: number | undefined;
|
|
19225
19278
|
errorMessage?: string | undefined;
|
|
19226
19279
|
metadata?: Record<string, unknown> | undefined;
|
|
19280
|
+
/**
|
|
19281
|
+
* The policy verdict for this invocation, when a rule fired (#5228 review).
|
|
19282
|
+
*
|
|
19283
|
+
* Only `would_deny` reaches here: a real `deny` returns before the handler
|
|
19284
|
+
* runs, so it produces no invocation record at all. Set on EVERY near-miss
|
|
19285
|
+
* invocation, including those whose separate policy record was sampled out —
|
|
19286
|
+
* otherwise an executed near-miss would be indistinguishable from a call no
|
|
19287
|
+
* rule touched, which is the inference this change exists to break.
|
|
19288
|
+
*/
|
|
19289
|
+
policyDecision?: PolicyAuditDecision | undefined;
|
|
19227
19290
|
}
|
|
19291
|
+
/**
|
|
19292
|
+
* The verdict a policy evaluation reached.
|
|
19293
|
+
*
|
|
19294
|
+
* `would_deny` (#4991) is warn mode: a rule fired, but the firewall allowed the
|
|
19295
|
+
* call anyway. It is deliberately NOT `deny` — recording it as a denial would
|
|
19296
|
+
* assert an enforcement that never happened — and NOT `allow`, which would
|
|
19297
|
+
* erase the only signal the warn-mode soak produces. `#4988`'s enforce decision
|
|
19298
|
+
* is read from these records, so the instrument has to be able to say
|
|
19299
|
+
* "a rule would have stopped this" without lying in either direction.
|
|
19300
|
+
*
|
|
19301
|
+
* BREAKING for implementors of {@link IAuditLogger} (ratified 5/6, #4991):
|
|
19302
|
+
* TypeScript's method-parameter bivariance means an out-of-tree implementor
|
|
19303
|
+
* typed against the old two-value union still COMPILES and then receives
|
|
19304
|
+
* `would_deny` at runtime, falling through whatever its `=== 'deny'` branch
|
|
19305
|
+
* does. The major version bump is the only thing that makes those implementors
|
|
19306
|
+
* look.
|
|
19307
|
+
*/
|
|
19308
|
+
type PolicyAuditDecision = 'allow' | 'deny' | 'would_deny';
|
|
19228
19309
|
interface PolicyDecisionAuditOpts {
|
|
19229
19310
|
policyName: string;
|
|
19230
|
-
decision:
|
|
19311
|
+
decision: PolicyAuditDecision;
|
|
19231
19312
|
reason: string;
|
|
19232
19313
|
toolName: string;
|
|
19233
19314
|
actor: AuditActor;
|
|
19234
19315
|
requestId?: string | undefined;
|
|
19235
19316
|
metadata?: Record<string, unknown> | undefined;
|
|
19317
|
+
/**
|
|
19318
|
+
* Which occurrence of this `{tool, rule}` near-miss this record represents
|
|
19319
|
+
* (#5228 review). Set only for a sampled `would_deny`; absent means every
|
|
19320
|
+
* occurrence was recorded.
|
|
19321
|
+
*/
|
|
19322
|
+
occurrence?: number | undefined;
|
|
19236
19323
|
}
|
|
19237
19324
|
interface SecurityEventAuditOpts {
|
|
19238
19325
|
eventType: string;
|
package/dist/index.js
CHANGED
|
@@ -553,7 +553,7 @@ import {
|
|
|
553
553
|
withLogging,
|
|
554
554
|
withRetry,
|
|
555
555
|
withRetryWrapper
|
|
556
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-WMXHD6UA.js";
|
|
557
557
|
import {
|
|
558
558
|
FALLBACK_SCANNER_DATA,
|
|
559
559
|
buildPlanFromAnalysis,
|
|
@@ -574,7 +574,7 @@ import {
|
|
|
574
574
|
connectTransport,
|
|
575
575
|
createServer,
|
|
576
576
|
startStdioServer
|
|
577
|
-
} from "./chunk-
|
|
577
|
+
} from "./chunk-46XUGUB4.js";
|
|
578
578
|
import {
|
|
579
579
|
OPENAI_MODELS,
|
|
580
580
|
OPENAI_MODEL_ALIASES,
|
|
@@ -632,7 +632,7 @@ import {
|
|
|
632
632
|
generateProposalId,
|
|
633
633
|
parseAgentPairKey,
|
|
634
634
|
registerConsensusVoteTool
|
|
635
|
-
} from "./chunk-
|
|
635
|
+
} from "./chunk-K3ZTZSLW.js";
|
|
636
636
|
import "./chunk-JC4WREXA.js";
|
|
637
637
|
import {
|
|
638
638
|
allOf
|
|
@@ -683,7 +683,7 @@ import {
|
|
|
683
683
|
import {
|
|
684
684
|
ImprovementReviewInputSchema,
|
|
685
685
|
registerImprovementReviewTool
|
|
686
|
-
} from "./chunk-
|
|
686
|
+
} from "./chunk-6SA3FIBZ.js";
|
|
687
687
|
import {
|
|
688
688
|
AgentPerformanceSchema,
|
|
689
689
|
ConsensusAlgorithmSchema,
|
|
@@ -719,10 +719,10 @@ import {
|
|
|
719
719
|
toolSuccess,
|
|
720
720
|
toolSuccessStructured,
|
|
721
721
|
validateToolInput
|
|
722
|
-
} from "./chunk-
|
|
722
|
+
} from "./chunk-XF6J4PCH.js";
|
|
723
723
|
import {
|
|
724
724
|
VERSION
|
|
725
|
-
} from "./chunk-
|
|
725
|
+
} from "./chunk-OXJEIMLS.js";
|
|
726
726
|
import {
|
|
727
727
|
AuditTrail,
|
|
728
728
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -4755,7 +4755,7 @@ function buildVotingInput(plan, config) {
|
|
|
4755
4755
|
}
|
|
4756
4756
|
async function executeSingleVote(plan, config, log) {
|
|
4757
4757
|
try {
|
|
4758
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
4758
|
+
const { executeVoting } = await import("./consensus-vote-ZMEESJFP.js");
|
|
4759
4759
|
const input = buildVotingInput(plan, config);
|
|
4760
4760
|
const result = await executeVoting(input, log);
|
|
4761
4761
|
return parseVotingResult(result);
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
NEXUS_DATA_DIR,
|
|
3
3
|
describeDataDirFix,
|
|
4
4
|
initDataDirectories
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-46XUGUB4.js";
|
|
6
6
|
import "./chunk-CF5CXFYJ.js";
|
|
7
7
|
import "./chunk-JC4WREXA.js";
|
|
8
8
|
import "./chunk-OQB3XC5O.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-OXJEIMLS.js";
|
|
10
10
|
import "./chunk-6T3EPABN.js";
|
|
11
11
|
import "./chunk-KYCJ47JZ.js";
|
|
12
12
|
import "./chunk-UAKFLKW3.js";
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
describeDataDirFix,
|
|
27
27
|
initDataDirectories
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=setup-data-dir-
|
|
29
|
+
//# sourceMappingURL=setup-data-dir-3MPQZUHC.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexus-agents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
|
|
5
5
|
"mcpName": "io.github.nexus-substrate/nexus-agents",
|
|
6
6
|
"license": "MIT",
|