sentinelayer-cli 0.46.5 → 0.48.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/README.md +47 -3
- package/package.json +12 -7
- package/skills/omar-gate-setup/SKILL.md +103 -0
- package/skills/senti-agent-identity/SKILL.md +80 -0
- package/skills/senti-judge/SKILL.md +139 -0
- package/skills/senti-room-notifications/SKILL.md +73 -0
- package/skills/senti-room-notifications/listen-wrapper.cjs +150 -0
- package/skills/senti-room-notifications/package.json +1 -0
- package/skills/senti-room-notifications/test-classifier.js +109 -0
- package/skills/senti-room-notifications/test-receipt.js +54 -0
- package/skills/sentinelayer-cli/SKILL.md +222 -0
- package/src/agents/devtestbot/runner.js +22 -11
- package/src/agents/devtestbot/tool.js +24 -11
- package/src/agents/jules/fix-cycle.js +7 -1
- package/src/agents/jules/tools/runtime-audit.js +17 -12
- package/src/agents/shared-tools/dispatch-core.js +10 -5
- package/src/ai/aidenid.js +4 -2
- package/src/ai/domain-target-store.js +11 -5
- package/src/ai/identity-store.js +11 -5
- package/src/ai/site-store.js +8 -4
- package/src/audit/orchestrator.js +21 -14
- package/src/audit/package.js +6 -4
- package/src/audit/persona-loop.js +7 -0
- package/src/audit/replay.js +4 -2
- package/src/auth/gate.js +32 -1
- package/src/auth/session-store.js +37 -0
- package/src/board/evidence-resolvers.js +3 -4
- package/src/cli.js +23 -3
- package/src/commands/ai/identity-lifecycle.js +30 -26
- package/src/commands/ai/provision-governance.js +32 -24
- package/src/commands/ai/shared.js +6 -4
- package/src/commands/audit.js +14 -12
- package/src/commands/board.js +2 -2
- package/src/commands/chat.js +8 -6
- package/src/commands/judge.js +125 -0
- package/src/commands/legacy-args.js +1 -0
- package/src/commands/mcp.js +45 -52
- package/src/commands/omargate.js +2 -1
- package/src/commands/plugin.js +11 -3
- package/src/commands/review.js +9 -4
- package/src/commands/scan.js +7 -7
- package/src/commands/session.js +516 -30
- package/src/commands/skills.js +45 -0
- package/src/commands/watch.js +9 -7
- package/src/config/output-filesystem.js +156 -0
- package/src/config/schema.js +4 -2
- package/src/config/service.js +40 -4
- package/src/cost/history.js +15 -9
- package/src/daemon/artifact-lineage.js +15 -12
- package/src/daemon/assignment-ledger.js +31 -25
- package/src/daemon/ast-drift.js +7 -3
- package/src/daemon/budget-governor.js +26 -20
- package/src/daemon/error-worker.js +28 -22
- package/src/daemon/fix-cycle.js +5 -4
- package/src/daemon/hybrid-mapper.js +19 -16
- package/src/daemon/ingest-refresh.js +4 -0
- package/src/daemon/jira-lifecycle.js +21 -17
- package/src/daemon/operator-control.js +18 -15
- package/src/daemon/reliability-lane.js +18 -15
- package/src/daemon/scope-engine.js +12 -8
- package/src/daemon/watchdog.js +15 -12
- package/src/engram/build-state.js +24 -3
- package/src/engram/capability-index.js +367 -0
- package/src/engram/compile-graph.js +1063 -0
- package/src/engram/contracts/action-receipt.js +82 -0
- package/src/engram/contracts/capability-index.js +259 -0
- package/src/engram/contracts/capability.js +377 -0
- package/src/engram/contracts/content-hash.js +8 -0
- package/src/engram/contracts/evidence.js +258 -0
- package/src/engram/contracts/graph.js +594 -0
- package/src/engram/contracts/identity.js +8 -0
- package/src/engram/contracts/index.js +149 -0
- package/src/engram/contracts/media-asset.js +85 -0
- package/src/engram/contracts/money.js +249 -0
- package/src/engram/contracts/source-snapshot.js +57 -0
- package/src/engram/contracts/task-context-pack.js +114 -0
- package/src/engram/contracts/temporal-segment.js +72 -0
- package/src/engram/contracts/versions.js +96 -0
- package/src/engram/extract-html.js +692 -0
- package/src/engram/graph-store.js +877 -0
- package/src/engram/index.js +98 -14
- package/src/engram/ingest-site.js +132 -0
- package/src/engram/live-state.js +1180 -0
- package/src/engram/namespace.js +34 -1
- package/src/engram/retrieve-site.js +753 -0
- package/src/engram/safe-reader.js +597 -0
- package/src/engram/source-intake.js +251 -0
- package/src/engram/store.js +227 -9
- package/src/ingest/engine.js +21 -28
- package/src/judge/verdict.js +305 -0
- package/src/legacy-cli.js +96 -19
- package/src/mcp/bridge-inputs.js +25 -4
- package/src/mcp/cli-command-tools.js +70 -0
- package/src/mcp/registry.js +17 -13
- package/src/mcp/session-stdio-server.js +297 -19
- package/src/memory/blackboard.js +5 -4
- package/src/net/gh-api-path.js +35 -9
- package/src/net/test-egress-guard.js +16 -4
- package/src/plugin/manifest.js +12 -8
- package/src/review/ai-review.js +110 -10
- package/src/review/investor-dd-devtestbot.js +17 -6
- package/src/review/investor-dd-orchestrator.js +21 -13
- package/src/review/local-review.js +26 -16
- package/src/review/omargate-cache.js +5 -5
- package/src/review/omargate-orchestrator.js +89 -17
- package/src/review/replay.js +9 -4
- package/src/review/report.js +22 -13
- package/src/review/typesafe-severity.js +201 -0
- package/src/session/admission-auth.js +34 -7
- package/src/session/admission.js +110 -15
- package/src/session/attachment-summary.js +77 -0
- package/src/session/edit-summary.js +19 -0
- package/src/session/invitations.js +65 -1
- package/src/session/mentions.js +17 -9
- package/src/session/message-edits.js +5 -4
- package/src/session/preview.js +10 -2
- package/src/session/recap.js +3 -2
- package/src/session/room-files.js +519 -0
- package/src/session/route-classes.js +22 -8
- package/src/session/setup-guides.js +4 -0
- package/src/session/standup.js +192 -0
- package/src/session/sync.js +229 -10
- package/src/session/tickets.js +41 -0
- package/src/session/transcript.js +2 -1
- package/src/session/wake/resolve-target.js +7 -3
- package/src/skills/listener-runtime.cjs +92 -0
- package/src/skills/service.js +207 -0
- package/src/swarm/factory.js +5 -5
- package/src/swarm/pentest.js +9 -9
- package/src/swarm/report.js +4 -4
- package/src/swarm/runtime.js +15 -12
- package/src/swarm/scenario-dsl.js +7 -5
- package/src/telemetry/ledger.js +16 -7
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ENGRAM §EW02 — TemporalSegment contract.
|
|
3
|
+
*
|
|
4
|
+
* A TemporalSegment anchors a set of assertions to a specific time window.
|
|
5
|
+
* It is used for freshness tracking, replay, and time-bounded evidence
|
|
6
|
+
* retrieval. Every temporal segment must declare its boundaries and a
|
|
7
|
+
* source snapshot.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
import { sourceSnapshotSchema } from "./source-snapshot.js";
|
|
12
|
+
|
|
13
|
+
export const TEMPORAL_SEGMENT_KINDS = Object.freeze([
|
|
14
|
+
"session",
|
|
15
|
+
"observation_window",
|
|
16
|
+
"ingest_batch",
|
|
17
|
+
"replay_range",
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
export const temporalSegmentKindSchema = z.enum([
|
|
21
|
+
"session",
|
|
22
|
+
"observation_window",
|
|
23
|
+
"ingest_batch",
|
|
24
|
+
"replay_range",
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A time-bounded segment of the ENGRAM graph.
|
|
29
|
+
*/
|
|
30
|
+
export const temporalSegmentSchema = z.object({
|
|
31
|
+
segmentId: z.string().min(1),
|
|
32
|
+
kind: temporalSegmentKindSchema,
|
|
33
|
+
startTime: z.string().datetime(),
|
|
34
|
+
endTime: z.string().datetime(),
|
|
35
|
+
sourceSnapshot: sourceSnapshotSchema,
|
|
36
|
+
assertionCount: z.number().int().nonnegative().optional(),
|
|
37
|
+
coverageRatio: z.number().min(0).max(1).optional(),
|
|
38
|
+
tenantScope: z.string().min(1),
|
|
39
|
+
}).strict().refine(
|
|
40
|
+
(data) => data.tenantScope === data.sourceSnapshot.tenantScope,
|
|
41
|
+
{ message: "segment tenantScope must match sourceSnapshot tenantScope", path: ["tenantScope"] },
|
|
42
|
+
).refine(
|
|
43
|
+
(data) => {
|
|
44
|
+
// Parse timestamps as instants rather than comparing strings.
|
|
45
|
+
// Lexical comparison can accept ".10Z" > ".1Z" even though they
|
|
46
|
+
// represent the same instant (luna-judge P2 finding).
|
|
47
|
+
const startMs = Date.parse(data.startTime);
|
|
48
|
+
const endMs = Date.parse(data.endTime);
|
|
49
|
+
if (isNaN(startMs) || isNaN(endMs)) return false;
|
|
50
|
+
return endMs > startMs;
|
|
51
|
+
},
|
|
52
|
+
{ message: "endTime must be strictly after startTime (compared as instants)", path: ["endTime"] },
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Valid fixture: a complete, valid temporal segment.
|
|
57
|
+
*/
|
|
58
|
+
export const VALID_TEMPORAL_SEGMENT = Object.freeze({
|
|
59
|
+
segmentId: "ts-session-20261023-001",
|
|
60
|
+
kind: "session",
|
|
61
|
+
startTime: "2026-10-23T12:00:00Z",
|
|
62
|
+
endTime: "2026-10-23T12:30:00Z",
|
|
63
|
+
sourceSnapshot: {
|
|
64
|
+
sourceId: "src-session-abc123",
|
|
65
|
+
sourceType: "session",
|
|
66
|
+
version: "1.2.0",
|
|
67
|
+
capturedAt: "2026-10-23T12:00:00Z",
|
|
68
|
+
tenantScope: "tenant/acme",
|
|
69
|
+
},
|
|
70
|
+
assertionCount: 150,
|
|
71
|
+
tenantScope: "tenant/acme",
|
|
72
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ENGRAM §EW02 — Contract version constants and compatibility fixtures.
|
|
3
|
+
*
|
|
4
|
+
* Every contract schema carries a canonical version. Consumers use these
|
|
5
|
+
* constants to declare which contract version they were built against, and
|
|
6
|
+
* compatibility fixtures verify that old data surfaces parse against the
|
|
7
|
+
* current schemas.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Canonical schema versions for EW02 contracts.
|
|
12
|
+
* Bump these when a contract changes in a way that existing fixtures would
|
|
13
|
+
* no longer validate.
|
|
14
|
+
*/
|
|
15
|
+
export const CONTRACT_VERSIONS = Object.freeze({
|
|
16
|
+
graph: "1.0.0",
|
|
17
|
+
capability: "1.0.0",
|
|
18
|
+
evidence: "1.0.0",
|
|
19
|
+
money: "1.0.0",
|
|
20
|
+
sourceSnapshot: "1.0.0",
|
|
21
|
+
mediaAsset: "1.0.0",
|
|
22
|
+
temporalSegment: "1.0.0",
|
|
23
|
+
taskContextPack: "1.0.0",
|
|
24
|
+
actionReceipt: "1.0.0",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The supported graph schema version string.
|
|
29
|
+
*/
|
|
30
|
+
export const GRAPH_SCHEMA_VERSION = "1.0.0";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The supported evidence schema version string.
|
|
34
|
+
*/
|
|
35
|
+
export const EVIDENCE_SCHEMA_VERSION = "1.0.0";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Backward-compatibility fixture: a graph from a previous version that must
|
|
39
|
+
* still validate against the current schema (or be explicitly rejected with a
|
|
40
|
+
* clear migration path).
|
|
41
|
+
*/
|
|
42
|
+
export const COMPAT_FIXTURES = Object.freeze({
|
|
43
|
+
/**
|
|
44
|
+
* Prior-version fixture: a graph from a previous contract version (v0.9.0).
|
|
45
|
+
* This must either validate against the current schema (migration path) or
|
|
46
|
+
* be explicitly rejected. It proves that the contract handles version skew,
|
|
47
|
+
* not just same-version data (luna-judge P2 finding — backward-compat req).
|
|
48
|
+
*/
|
|
49
|
+
graphV0_9: Object.freeze({
|
|
50
|
+
// v0.9.0 graph lacking mandatory source field (added in v1.0.0).
|
|
51
|
+
// The current schema must reject this — silent acceptance of old data
|
|
52
|
+
// without migration is not allowed.
|
|
53
|
+
version: "0.9.0",
|
|
54
|
+
assertions: [
|
|
55
|
+
{
|
|
56
|
+
id: "assert-v0_9-001",
|
|
57
|
+
subject: "entity/a",
|
|
58
|
+
predicate: "connected_to",
|
|
59
|
+
object: { target: "entity/b" },
|
|
60
|
+
provenance: "observed",
|
|
61
|
+
schemaValidity: "valid",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
generatedAt: "2026-10-22T00:00:00Z",
|
|
65
|
+
entities: [
|
|
66
|
+
{
|
|
67
|
+
id: "entity/a",
|
|
68
|
+
type: "node",
|
|
69
|
+
tenantScope: "tenant/default",
|
|
70
|
+
sourceVersion: "0.9.0",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
}),
|
|
74
|
+
|
|
75
|
+
/** Graph v1.0.0 current-version minimal valid fixture. */
|
|
76
|
+
graphV1: Object.freeze({
|
|
77
|
+
version: "1.0.0",
|
|
78
|
+
assertions: [
|
|
79
|
+
{
|
|
80
|
+
id: "assert-v1-001",
|
|
81
|
+
subject: "entity/a",
|
|
82
|
+
predicate: "connected_to",
|
|
83
|
+
object: { target: "entity/b" },
|
|
84
|
+
provenance: "observed",
|
|
85
|
+
schemaValidity: "valid",
|
|
86
|
+
source: {
|
|
87
|
+
sourceId: "src-compat-v1",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
capturedAt: "2026-10-23T00:00:00Z",
|
|
90
|
+
tenantScope: "tenant/default",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
generatedAt: "2026-10-23T00:00:00Z",
|
|
95
|
+
}),
|
|
96
|
+
});
|