@sanctuary-framework/mcp-server 1.2.9 → 1.2.10
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/cli.cjs +470 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +470 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +448 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -66
- package/dist/index.d.ts +82 -66
- package/dist/index.js +448 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7129,6 +7129,72 @@ declare class ApprovalAggregator {
|
|
|
7129
7129
|
private hydrate;
|
|
7130
7130
|
}
|
|
7131
7131
|
|
|
7132
|
+
/**
|
|
7133
|
+
* Sanctuary v1.3 WP-V1.3-1 Sentinel Finding Store.
|
|
7134
|
+
*
|
|
7135
|
+
* Encrypted at-rest persistence for sentinel findings. Sibling to the
|
|
7136
|
+
* Upsilon-3 aggregator-store: same fortress-master-key-derived HKDF
|
|
7137
|
+
* subkey shape, AAD-bound to the finding_id, retention-aware.
|
|
7138
|
+
*
|
|
7139
|
+
* Storage layout:
|
|
7140
|
+
* namespace: `_sentinel_findings`
|
|
7141
|
+
* key: `finding.{finding_id}` (one record per finding)
|
|
7142
|
+
* payload: AES-256-GCM ciphertext of the JSON-serialized record.
|
|
7143
|
+
* key: `l2-sentinel-finding-v1` HKDF subkey of fortress master.
|
|
7144
|
+
* AAD: UTF-8 bytes of `finding_id`.
|
|
7145
|
+
*
|
|
7146
|
+
* Multi-fortress isolation: HKDF subkey derives from the fortress
|
|
7147
|
+
* master key. Two fortresses never produce identical encryption keys
|
|
7148
|
+
* for identical finding_ids.
|
|
7149
|
+
*
|
|
7150
|
+
* Retention: 30 days default, mirroring the audit-log envelope and the
|
|
7151
|
+
* aggregator payload store.
|
|
7152
|
+
*/
|
|
7153
|
+
|
|
7154
|
+
interface SentinelFindingStoreOptions {
|
|
7155
|
+
storage: StorageBackend;
|
|
7156
|
+
masterKey: Uint8Array;
|
|
7157
|
+
fortressId: string;
|
|
7158
|
+
/** Operator-tunable retention window. Default 30 days. */
|
|
7159
|
+
retentionDays?: number;
|
|
7160
|
+
/** Wall-clock provider for deterministic tests. */
|
|
7161
|
+
now?: () => Date;
|
|
7162
|
+
}
|
|
7163
|
+
declare class SentinelFindingStore {
|
|
7164
|
+
private readonly storage;
|
|
7165
|
+
private readonly encryptionKey;
|
|
7166
|
+
private readonly fortressId;
|
|
7167
|
+
private readonly retentionDays;
|
|
7168
|
+
private readonly now;
|
|
7169
|
+
constructor(opts: SentinelFindingStoreOptions);
|
|
7170
|
+
/**
|
|
7171
|
+
* Persist a finding. Truncates the operator-visible summary to
|
|
7172
|
+
* SENTINEL_SUMMARY_MAX_CHARS so the dashboard render stays bounded.
|
|
7173
|
+
* Returns the retention deadline so callers can audit it.
|
|
7174
|
+
*/
|
|
7175
|
+
saveFinding(finding: SentinelFinding): Promise<string>;
|
|
7176
|
+
/** Load a single finding by id, or null when absent / corrupted. */
|
|
7177
|
+
loadFinding(findingId: string): Promise<SentinelFinding | null>;
|
|
7178
|
+
/**
|
|
7179
|
+
* List findings, newest first. Optional filters: since (ISO 8601),
|
|
7180
|
+
* severity, sentinel_id, agent_id, limit. Default limit 100.
|
|
7181
|
+
*/
|
|
7182
|
+
listFindings(opts?: {
|
|
7183
|
+
since?: string;
|
|
7184
|
+
severity?: SentinelSeverity;
|
|
7185
|
+
sentinelId?: string;
|
|
7186
|
+
agentId?: string;
|
|
7187
|
+
limit?: number;
|
|
7188
|
+
}): Promise<SentinelFinding[]>;
|
|
7189
|
+
/**
|
|
7190
|
+
* Drop expired findings. Returns the count removed.
|
|
7191
|
+
*/
|
|
7192
|
+
pruneExpired(now?: Date): Promise<{
|
|
7193
|
+
pruned: number;
|
|
7194
|
+
}>;
|
|
7195
|
+
private decode;
|
|
7196
|
+
}
|
|
7197
|
+
|
|
7132
7198
|
/**
|
|
7133
7199
|
* Sanctuary v1.3 WP-V1.3-1 Sentinel Baseline Pack (Castle Layer 2 anchor)
|
|
7134
7200
|
*
|
|
@@ -7166,6 +7232,22 @@ interface SentinelContext {
|
|
|
7166
7232
|
substrateSelector?: SubstrateSelector;
|
|
7167
7233
|
/** Wall-clock provider. Tests inject a deterministic clock. */
|
|
7168
7234
|
now: () => Date;
|
|
7235
|
+
/**
|
|
7236
|
+
* Optional read view of the per-fortress sentinel finding store
|
|
7237
|
+
* (Phi-1 surface). First-order sentinels (Phi-1/2/3/4) do not need
|
|
7238
|
+
* this; the Phi-5 meta-sentinel reads it to detect patterns ACROSS
|
|
7239
|
+
* other sentinels' findings (compound finding, fortress-wide count
|
|
7240
|
+
* spikes, novel sentinel-ID combinations). The dispatcher attaches
|
|
7241
|
+
* the store automatically on `subscribeSentinel`; tests can omit it
|
|
7242
|
+
* when constructing a context literal for a first-order watcher.
|
|
7243
|
+
*
|
|
7244
|
+
* Multi-fortress isolation rides on the store's existing key shape:
|
|
7245
|
+
* the store is constructed per-fortress from the fortress master
|
|
7246
|
+
* key, so two fortresses' stores produce distinct ciphertext for
|
|
7247
|
+
* identical finding-ids and one fortress's read cannot decode
|
|
7248
|
+
* another fortress's findings.
|
|
7249
|
+
*/
|
|
7250
|
+
findingStore?: SentinelFindingStore;
|
|
7169
7251
|
}
|
|
7170
7252
|
/**
|
|
7171
7253
|
* One observation a sentinel produced. Persisted under the sentinel
|
|
@@ -7331,72 +7413,6 @@ declare class SentinelRegistry {
|
|
|
7331
7413
|
unsubscribeAll(): Promise<void>;
|
|
7332
7414
|
}
|
|
7333
7415
|
|
|
7334
|
-
/**
|
|
7335
|
-
* Sanctuary v1.3 WP-V1.3-1 Sentinel Finding Store.
|
|
7336
|
-
*
|
|
7337
|
-
* Encrypted at-rest persistence for sentinel findings. Sibling to the
|
|
7338
|
-
* Upsilon-3 aggregator-store: same fortress-master-key-derived HKDF
|
|
7339
|
-
* subkey shape, AAD-bound to the finding_id, retention-aware.
|
|
7340
|
-
*
|
|
7341
|
-
* Storage layout:
|
|
7342
|
-
* namespace: `_sentinel_findings`
|
|
7343
|
-
* key: `finding.{finding_id}` (one record per finding)
|
|
7344
|
-
* payload: AES-256-GCM ciphertext of the JSON-serialized record.
|
|
7345
|
-
* key: `l2-sentinel-finding-v1` HKDF subkey of fortress master.
|
|
7346
|
-
* AAD: UTF-8 bytes of `finding_id`.
|
|
7347
|
-
*
|
|
7348
|
-
* Multi-fortress isolation: HKDF subkey derives from the fortress
|
|
7349
|
-
* master key. Two fortresses never produce identical encryption keys
|
|
7350
|
-
* for identical finding_ids.
|
|
7351
|
-
*
|
|
7352
|
-
* Retention: 30 days default, mirroring the audit-log envelope and the
|
|
7353
|
-
* aggregator payload store.
|
|
7354
|
-
*/
|
|
7355
|
-
|
|
7356
|
-
interface SentinelFindingStoreOptions {
|
|
7357
|
-
storage: StorageBackend;
|
|
7358
|
-
masterKey: Uint8Array;
|
|
7359
|
-
fortressId: string;
|
|
7360
|
-
/** Operator-tunable retention window. Default 30 days. */
|
|
7361
|
-
retentionDays?: number;
|
|
7362
|
-
/** Wall-clock provider for deterministic tests. */
|
|
7363
|
-
now?: () => Date;
|
|
7364
|
-
}
|
|
7365
|
-
declare class SentinelFindingStore {
|
|
7366
|
-
private readonly storage;
|
|
7367
|
-
private readonly encryptionKey;
|
|
7368
|
-
private readonly fortressId;
|
|
7369
|
-
private readonly retentionDays;
|
|
7370
|
-
private readonly now;
|
|
7371
|
-
constructor(opts: SentinelFindingStoreOptions);
|
|
7372
|
-
/**
|
|
7373
|
-
* Persist a finding. Truncates the operator-visible summary to
|
|
7374
|
-
* SENTINEL_SUMMARY_MAX_CHARS so the dashboard render stays bounded.
|
|
7375
|
-
* Returns the retention deadline so callers can audit it.
|
|
7376
|
-
*/
|
|
7377
|
-
saveFinding(finding: SentinelFinding): Promise<string>;
|
|
7378
|
-
/** Load a single finding by id, or null when absent / corrupted. */
|
|
7379
|
-
loadFinding(findingId: string): Promise<SentinelFinding | null>;
|
|
7380
|
-
/**
|
|
7381
|
-
* List findings, newest first. Optional filters: since (ISO 8601),
|
|
7382
|
-
* severity, sentinel_id, agent_id, limit. Default limit 100.
|
|
7383
|
-
*/
|
|
7384
|
-
listFindings(opts?: {
|
|
7385
|
-
since?: string;
|
|
7386
|
-
severity?: SentinelSeverity;
|
|
7387
|
-
sentinelId?: string;
|
|
7388
|
-
agentId?: string;
|
|
7389
|
-
limit?: number;
|
|
7390
|
-
}): Promise<SentinelFinding[]>;
|
|
7391
|
-
/**
|
|
7392
|
-
* Drop expired findings. Returns the count removed.
|
|
7393
|
-
*/
|
|
7394
|
-
pruneExpired(now?: Date): Promise<{
|
|
7395
|
-
pruned: number;
|
|
7396
|
-
}>;
|
|
7397
|
-
private decode;
|
|
7398
|
-
}
|
|
7399
|
-
|
|
7400
7416
|
/**
|
|
7401
7417
|
* Sanctuary v1.3 WP-V1.3-1 Sentinel Dispatcher.
|
|
7402
7418
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -7129,6 +7129,72 @@ declare class ApprovalAggregator {
|
|
|
7129
7129
|
private hydrate;
|
|
7130
7130
|
}
|
|
7131
7131
|
|
|
7132
|
+
/**
|
|
7133
|
+
* Sanctuary v1.3 WP-V1.3-1 Sentinel Finding Store.
|
|
7134
|
+
*
|
|
7135
|
+
* Encrypted at-rest persistence for sentinel findings. Sibling to the
|
|
7136
|
+
* Upsilon-3 aggregator-store: same fortress-master-key-derived HKDF
|
|
7137
|
+
* subkey shape, AAD-bound to the finding_id, retention-aware.
|
|
7138
|
+
*
|
|
7139
|
+
* Storage layout:
|
|
7140
|
+
* namespace: `_sentinel_findings`
|
|
7141
|
+
* key: `finding.{finding_id}` (one record per finding)
|
|
7142
|
+
* payload: AES-256-GCM ciphertext of the JSON-serialized record.
|
|
7143
|
+
* key: `l2-sentinel-finding-v1` HKDF subkey of fortress master.
|
|
7144
|
+
* AAD: UTF-8 bytes of `finding_id`.
|
|
7145
|
+
*
|
|
7146
|
+
* Multi-fortress isolation: HKDF subkey derives from the fortress
|
|
7147
|
+
* master key. Two fortresses never produce identical encryption keys
|
|
7148
|
+
* for identical finding_ids.
|
|
7149
|
+
*
|
|
7150
|
+
* Retention: 30 days default, mirroring the audit-log envelope and the
|
|
7151
|
+
* aggregator payload store.
|
|
7152
|
+
*/
|
|
7153
|
+
|
|
7154
|
+
interface SentinelFindingStoreOptions {
|
|
7155
|
+
storage: StorageBackend;
|
|
7156
|
+
masterKey: Uint8Array;
|
|
7157
|
+
fortressId: string;
|
|
7158
|
+
/** Operator-tunable retention window. Default 30 days. */
|
|
7159
|
+
retentionDays?: number;
|
|
7160
|
+
/** Wall-clock provider for deterministic tests. */
|
|
7161
|
+
now?: () => Date;
|
|
7162
|
+
}
|
|
7163
|
+
declare class SentinelFindingStore {
|
|
7164
|
+
private readonly storage;
|
|
7165
|
+
private readonly encryptionKey;
|
|
7166
|
+
private readonly fortressId;
|
|
7167
|
+
private readonly retentionDays;
|
|
7168
|
+
private readonly now;
|
|
7169
|
+
constructor(opts: SentinelFindingStoreOptions);
|
|
7170
|
+
/**
|
|
7171
|
+
* Persist a finding. Truncates the operator-visible summary to
|
|
7172
|
+
* SENTINEL_SUMMARY_MAX_CHARS so the dashboard render stays bounded.
|
|
7173
|
+
* Returns the retention deadline so callers can audit it.
|
|
7174
|
+
*/
|
|
7175
|
+
saveFinding(finding: SentinelFinding): Promise<string>;
|
|
7176
|
+
/** Load a single finding by id, or null when absent / corrupted. */
|
|
7177
|
+
loadFinding(findingId: string): Promise<SentinelFinding | null>;
|
|
7178
|
+
/**
|
|
7179
|
+
* List findings, newest first. Optional filters: since (ISO 8601),
|
|
7180
|
+
* severity, sentinel_id, agent_id, limit. Default limit 100.
|
|
7181
|
+
*/
|
|
7182
|
+
listFindings(opts?: {
|
|
7183
|
+
since?: string;
|
|
7184
|
+
severity?: SentinelSeverity;
|
|
7185
|
+
sentinelId?: string;
|
|
7186
|
+
agentId?: string;
|
|
7187
|
+
limit?: number;
|
|
7188
|
+
}): Promise<SentinelFinding[]>;
|
|
7189
|
+
/**
|
|
7190
|
+
* Drop expired findings. Returns the count removed.
|
|
7191
|
+
*/
|
|
7192
|
+
pruneExpired(now?: Date): Promise<{
|
|
7193
|
+
pruned: number;
|
|
7194
|
+
}>;
|
|
7195
|
+
private decode;
|
|
7196
|
+
}
|
|
7197
|
+
|
|
7132
7198
|
/**
|
|
7133
7199
|
* Sanctuary v1.3 WP-V1.3-1 Sentinel Baseline Pack (Castle Layer 2 anchor)
|
|
7134
7200
|
*
|
|
@@ -7166,6 +7232,22 @@ interface SentinelContext {
|
|
|
7166
7232
|
substrateSelector?: SubstrateSelector;
|
|
7167
7233
|
/** Wall-clock provider. Tests inject a deterministic clock. */
|
|
7168
7234
|
now: () => Date;
|
|
7235
|
+
/**
|
|
7236
|
+
* Optional read view of the per-fortress sentinel finding store
|
|
7237
|
+
* (Phi-1 surface). First-order sentinels (Phi-1/2/3/4) do not need
|
|
7238
|
+
* this; the Phi-5 meta-sentinel reads it to detect patterns ACROSS
|
|
7239
|
+
* other sentinels' findings (compound finding, fortress-wide count
|
|
7240
|
+
* spikes, novel sentinel-ID combinations). The dispatcher attaches
|
|
7241
|
+
* the store automatically on `subscribeSentinel`; tests can omit it
|
|
7242
|
+
* when constructing a context literal for a first-order watcher.
|
|
7243
|
+
*
|
|
7244
|
+
* Multi-fortress isolation rides on the store's existing key shape:
|
|
7245
|
+
* the store is constructed per-fortress from the fortress master
|
|
7246
|
+
* key, so two fortresses' stores produce distinct ciphertext for
|
|
7247
|
+
* identical finding-ids and one fortress's read cannot decode
|
|
7248
|
+
* another fortress's findings.
|
|
7249
|
+
*/
|
|
7250
|
+
findingStore?: SentinelFindingStore;
|
|
7169
7251
|
}
|
|
7170
7252
|
/**
|
|
7171
7253
|
* One observation a sentinel produced. Persisted under the sentinel
|
|
@@ -7331,72 +7413,6 @@ declare class SentinelRegistry {
|
|
|
7331
7413
|
unsubscribeAll(): Promise<void>;
|
|
7332
7414
|
}
|
|
7333
7415
|
|
|
7334
|
-
/**
|
|
7335
|
-
* Sanctuary v1.3 WP-V1.3-1 Sentinel Finding Store.
|
|
7336
|
-
*
|
|
7337
|
-
* Encrypted at-rest persistence for sentinel findings. Sibling to the
|
|
7338
|
-
* Upsilon-3 aggregator-store: same fortress-master-key-derived HKDF
|
|
7339
|
-
* subkey shape, AAD-bound to the finding_id, retention-aware.
|
|
7340
|
-
*
|
|
7341
|
-
* Storage layout:
|
|
7342
|
-
* namespace: `_sentinel_findings`
|
|
7343
|
-
* key: `finding.{finding_id}` (one record per finding)
|
|
7344
|
-
* payload: AES-256-GCM ciphertext of the JSON-serialized record.
|
|
7345
|
-
* key: `l2-sentinel-finding-v1` HKDF subkey of fortress master.
|
|
7346
|
-
* AAD: UTF-8 bytes of `finding_id`.
|
|
7347
|
-
*
|
|
7348
|
-
* Multi-fortress isolation: HKDF subkey derives from the fortress
|
|
7349
|
-
* master key. Two fortresses never produce identical encryption keys
|
|
7350
|
-
* for identical finding_ids.
|
|
7351
|
-
*
|
|
7352
|
-
* Retention: 30 days default, mirroring the audit-log envelope and the
|
|
7353
|
-
* aggregator payload store.
|
|
7354
|
-
*/
|
|
7355
|
-
|
|
7356
|
-
interface SentinelFindingStoreOptions {
|
|
7357
|
-
storage: StorageBackend;
|
|
7358
|
-
masterKey: Uint8Array;
|
|
7359
|
-
fortressId: string;
|
|
7360
|
-
/** Operator-tunable retention window. Default 30 days. */
|
|
7361
|
-
retentionDays?: number;
|
|
7362
|
-
/** Wall-clock provider for deterministic tests. */
|
|
7363
|
-
now?: () => Date;
|
|
7364
|
-
}
|
|
7365
|
-
declare class SentinelFindingStore {
|
|
7366
|
-
private readonly storage;
|
|
7367
|
-
private readonly encryptionKey;
|
|
7368
|
-
private readonly fortressId;
|
|
7369
|
-
private readonly retentionDays;
|
|
7370
|
-
private readonly now;
|
|
7371
|
-
constructor(opts: SentinelFindingStoreOptions);
|
|
7372
|
-
/**
|
|
7373
|
-
* Persist a finding. Truncates the operator-visible summary to
|
|
7374
|
-
* SENTINEL_SUMMARY_MAX_CHARS so the dashboard render stays bounded.
|
|
7375
|
-
* Returns the retention deadline so callers can audit it.
|
|
7376
|
-
*/
|
|
7377
|
-
saveFinding(finding: SentinelFinding): Promise<string>;
|
|
7378
|
-
/** Load a single finding by id, or null when absent / corrupted. */
|
|
7379
|
-
loadFinding(findingId: string): Promise<SentinelFinding | null>;
|
|
7380
|
-
/**
|
|
7381
|
-
* List findings, newest first. Optional filters: since (ISO 8601),
|
|
7382
|
-
* severity, sentinel_id, agent_id, limit. Default limit 100.
|
|
7383
|
-
*/
|
|
7384
|
-
listFindings(opts?: {
|
|
7385
|
-
since?: string;
|
|
7386
|
-
severity?: SentinelSeverity;
|
|
7387
|
-
sentinelId?: string;
|
|
7388
|
-
agentId?: string;
|
|
7389
|
-
limit?: number;
|
|
7390
|
-
}): Promise<SentinelFinding[]>;
|
|
7391
|
-
/**
|
|
7392
|
-
* Drop expired findings. Returns the count removed.
|
|
7393
|
-
*/
|
|
7394
|
-
pruneExpired(now?: Date): Promise<{
|
|
7395
|
-
pruned: number;
|
|
7396
|
-
}>;
|
|
7397
|
-
private decode;
|
|
7398
|
-
}
|
|
7399
|
-
|
|
7400
7416
|
/**
|
|
7401
7417
|
* Sanctuary v1.3 WP-V1.3-1 Sentinel Dispatcher.
|
|
7402
7418
|
*
|