@tuent/sentinel 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{runInitClaudeCode as de}from"./chunk-WPTJBRX5.js";import{AgentProfileManager as H,AlertManager as ge,AuditTrail as A,BaselineBuilder as N,CorrelationDetector as ue,DeviationDetector as B,FileStorageBackend as fe,ProfileStore as pe,ReportGenerator as me,Sentinel as T,SentinelRunner as he,generateFleetReport as ye}from"./chunk-NS6ZLMDK.js";import{readReleaseToken as we}from"./chunk-LATQNIRW.js";import{deriveAgentId as $e}from"./chunk-B5QKJHSV.js";import"./chunk-FMZWHT4M.js";import"./chunk-QHE56MEO.js";import{loadPolicy as ve}from"./chunk-2FFMYSVC.js";import{getOrCreateKeyPair as E}from"./chunk-NUXSUSYY.js";import{join as u}from"path";import{homedir as m}from"os";import{readFile as M,writeFile as R,access as K,mkdir as W}from"fs/promises";function Ae(e){const o=new Date(e);if(isNaN(o.getTime()))return"unknown";const t=Date.now()-o.getTime();if(t<0)return"just now";const a=Math.floor(t/6e4);if(a<1)return"just now";if(a<60)return`${a} minute${a===1?"":"s"} ago`;const r=Math.floor(a/60);if(r<24)return`${r} hour${r===1?"":"s"} ago`;const i=Math.floor(r/24);if(i<14)return`${i} day${i===1?"":"s"} ago`;const d=Math.floor(i/7);if(i<60)return`${d} week${d===1?"":"s"} ago`;if(i>=365)return"over a year ago";const c=Math.floor(i/30);return`${c} month${c===1?"":"s"} ago`}function Ie(e,o){const n=new Date(o),t=isNaN(n.getTime())?1/0:Math.floor((Date.now()-n.getTime())/864e5);return e<.3||t>30?"declining":e>.7&&t<7?"rising":"stable"}function Se(e){return e<.3?"inner":e<.65?"middle":"outer"}function G(e){if(e.length===0)return"No petals selected.";const o=new Map;for(const t of e)o.set(t.id,t.label);const n=[`Selected petals (${e.length}):
2
+ import{runInitClaudeCode as de}from"./chunk-FWIISAZZ.js";import{AgentProfileManager as H,AlertManager as ge,AuditTrail as A,BaselineBuilder as N,CorrelationDetector as ue,DeviationDetector as B,FileStorageBackend as fe,ProfileStore as pe,ReportGenerator as me,Sentinel as T,SentinelRunner as he,generateFleetReport as ye}from"./chunk-GRN5P3H2.js";import{readReleaseToken as we}from"./chunk-LATQNIRW.js";import{deriveAgentId as $e}from"./chunk-B5QKJHSV.js";import"./chunk-FMZWHT4M.js";import"./chunk-QIYQWOLO.js";import{loadPolicy as ve}from"./chunk-WLIDSTS4.js";import{getOrCreateKeyPair as E}from"./chunk-NUXSUSYY.js";import{join as u}from"path";import{homedir as m}from"os";import{readFile as M,writeFile as R,access as K,mkdir as W}from"fs/promises";function Ae(e){const o=new Date(e);if(isNaN(o.getTime()))return"unknown";const t=Date.now()-o.getTime();if(t<0)return"just now";const a=Math.floor(t/6e4);if(a<1)return"just now";if(a<60)return`${a} minute${a===1?"":"s"} ago`;const r=Math.floor(a/60);if(r<24)return`${r} hour${r===1?"":"s"} ago`;const i=Math.floor(r/24);if(i<14)return`${i} day${i===1?"":"s"} ago`;const d=Math.floor(i/7);if(i<60)return`${d} week${d===1?"":"s"} ago`;if(i>=365)return"over a year ago";const c=Math.floor(i/30);return`${c} month${c===1?"":"s"} ago`}function Ie(e,o){const n=new Date(o),t=isNaN(n.getTime())?1/0:Math.floor((Date.now()-n.getTime())/864e5);return e<.3||t>30?"declining":e>.7&&t<7?"rising":"stable"}function Se(e){return e<.3?"inner":e<.65?"middle":"outer"}function G(e){if(e.length===0)return"No petals selected.";const o=new Map;for(const t of e)o.set(t.id,t.label);const n=[`Selected petals (${e.length}):
3
3
  `];for(const t of e){const a=Se(t.layer),r=t.isRichData?"":" [filler]";n.push(`- ${t.label}${r}`),n.push(` Category: ${t.category}`),n.push(` Layer zone: ${a} (${(t.layer*100).toFixed(0)}%)`),n.push(` Openness: ${(t.openness*100).toFixed(0)}%`),n.push(` Description: ${t.description}`),n.push(` Last active: ${t.lastActive}`);const i=Ae(t.lastActive),d=t.weight!=null?Ie(t.weight,t.lastActive):"stable";if(n.push(` Temporal: Last active ${i} | Weight trend: ${d}`),t.source){const c={seed:"seed data",agent:"observed from activity",manual:"filesystem scan",diary:"personal diary entry",conversation:"created from conversation","agent-monitor":"monitored agent activity"};n.push(` Source: ${c[t.source]??t.source}`)}if(t.weight!=null&&n.push(` Weight: ${t.weight.toFixed(2)}`),t.connections.length>0){const c=t.connections.map(s=>o.get(s)??De(s));n.push(` Connections: ${c.join(", ")}`)}if(t.files&&t.files.length>0){const c=t.files.slice(0,10).map(s=>s.split("/").pop()??s);n.push(` Key files: ${c.join(", ")}`)}if(t.fileContents&&t.fileContents.length>0){n.push(" File contents:");for(const c of t.fileContents)n.push(` --- ${c.name} ---`),n.push(c.content.split(`
4
4
  `).map(s=>` ${s}`).join(`
5
5
  `))}n.push("")}return n.join(`
@@ -1,4 +1,4 @@
1
- import { v as Sentinel, e as AgentRole, S as SecurityFinding } from '../Sentinel-B_sv8Kiy.js';
1
+ import { v as Sentinel, e as AgentRole, S as SecurityFinding } from '../Sentinel-xFCyXH45.js';
2
2
  import 'node:crypto';
3
3
 
4
4
  /**
@@ -55,6 +55,26 @@ interface SentinelGatewayOptions {
55
55
  * is disabled (503) — there is no unauthenticated release path.
56
56
  */
57
57
  releaseToken?: string;
58
+ /**
59
+ * Sprint 26 Gate-A Item D (F-8) — disposition for tool names outside the
60
+ * recognized native set (MCP-shaped names never reach this; they have their
61
+ * own translation path). "warn" (default) allows the call and persists an
62
+ * observational unknown_tool finding to the audit trail — no unknown tool
63
+ * passes unlogged; "deny" is the hardened opt-in that blocks the call with
64
+ * a non-escalation-eligible unknown_tool finding. warn ships as the default
65
+ * because the recognized set is inventoried, not provably complete — the
66
+ * default flips to deny after warn-mode dogfooding reconciles the inventory
67
+ * against live traffic. Operator-only: sourced from the launch --policy
68
+ * yaml; workspace yamls contribute roles via the ceiling merge, never
69
+ * gateway config.
70
+ */
71
+ unknownTools?: "deny" | "warn";
72
+ /**
73
+ * Item D escape hatch: native-shaped names to treat as known
74
+ * tool_invocation (e.g. a cc tool newer than this Sentinel build).
75
+ * Operator-only, same channel as unknownTools.
76
+ */
77
+ allowUnknownTools?: string[];
58
78
  }
59
79
  declare class SentinelGateway {
60
80
  private readonly configuredPort;
@@ -68,6 +88,8 @@ declare class SentinelGateway {
68
88
  private readonly operatorCeiling;
69
89
  private readonly home;
70
90
  private readonly releaseToken;
91
+ /** Item D (F-8): disposition for unknown (non-MCP, unrecognized) tool names. */
92
+ private readonly unknownTools;
71
93
  private server;
72
94
  private running;
73
95
  private signalHandlersInstalled;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  SentinelGateway
3
- } from "../chunk-IYC5E7RL.js";
3
+ } from "../chunk-L4R3LPJS.js";
4
4
  import "../chunk-B5QKJHSV.js";
5
5
  import "../chunk-FMZWHT4M.js";
6
- import "../chunk-QHE56MEO.js";
7
- import "../chunk-2FFMYSVC.js";
6
+ import "../chunk-QIYQWOLO.js";
7
+ import "../chunk-WLIDSTS4.js";
8
8
  export {
9
9
  SentinelGateway
10
10
  };
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runGatewayDaemon
4
- } from "./chunk-IYC5E7RL.js";
4
+ } from "./chunk-L4R3LPJS.js";
5
5
  import "./chunk-B5QKJHSV.js";
6
6
  import "./chunk-FMZWHT4M.js";
7
- import "./chunk-QHE56MEO.js";
8
- import "./chunk-2FFMYSVC.js";
7
+ import "./chunk-QIYQWOLO.js";
8
+ import "./chunk-WLIDSTS4.js";
9
9
 
10
10
  // src/gatewayDaemon.ts
11
11
  var args = process.argv.slice(2);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentActivityEvent, S as SecurityFinding } from './Sentinel-B_sv8Kiy.js';
2
- export { a as AcceptableAction, b as AdapterConfig, c as AgentBaseline, d as AgentMode, e as AgentRole, f as AlertChannel, g as AlertConfig, h as AllowResponse, i as AuditEntry, j as AuditQueryOptions, B as BlockResponse, C as CorrelationFinding, E as ExceptionApprovalContext, k as ExceptionApprovalFn, G as GuideResponse, H as HookCheckpoint, l as HookContext, m as HookHandler, n as HookRegistration, o as HookResponse, I as IntentAlignmentConfig, p as IntentAlignmentResult, M as ModifiableEventFields, q as MonitorOptions, O as OverlayDecisionType, R as RepoSensitivityMap, r as ReportOptions, s as RoleException, t as SecuritySeverity, u as SensitivityOverlay, v as Sentinel, w as SentinelConfig, T as TaskIntent } from './Sentinel-B_sv8Kiy.js';
1
+ import { A as AgentActivityEvent, S as SecurityFinding } from './Sentinel-xFCyXH45.js';
2
+ export { a as AcceptableAction, b as AdapterConfig, c as AgentBaseline, d as AgentMode, e as AgentRole, f as AlertChannel, g as AlertConfig, h as AllowResponse, i as AuditEntry, j as AuditQueryOptions, B as BlockResponse, C as CorrelationFinding, E as ExceptionApprovalContext, k as ExceptionApprovalFn, G as GuideResponse, H as HookCheckpoint, l as HookContext, m as HookHandler, n as HookRegistration, o as HookResponse, I as IntentAlignmentConfig, p as IntentAlignmentResult, M as ModifiableEventFields, q as MonitorOptions, O as OverlayDecisionType, R as RepoSensitivityMap, r as ReportOptions, s as RoleException, t as SecuritySeverity, u as SensitivityOverlay, v as Sentinel, w as SentinelConfig, T as TaskIntent } from './Sentinel-xFCyXH45.js';
3
3
  import 'node:crypto';
4
4
 
5
5
  interface SentinelPolicy {
@@ -57,6 +57,15 @@ interface SentinelPolicy {
57
57
  minDaysObserved?: number;
58
58
  minCategoryDiversity?: number;
59
59
  };
60
+ /**
61
+ * Item D (F-8): disposition for tool names outside the recognized native
62
+ * set. Default "warn" (allow + persisted observational finding); "deny"
63
+ * is the hardened opt-in. Operator launch policy only — the gateway reads
64
+ * it once at start.
65
+ */
66
+ unknownTools?: "deny" | "warn";
67
+ /** Item D escape hatch: native-shaped names to treat as known. */
68
+ allowUnknownTools?: string[];
60
69
  };
61
70
  alerts?: {
62
71
  channels: (string | {
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  runInitClaudeCode,
3
3
  runSessionStart
4
- } from "./chunk-WPTJBRX5.js";
4
+ } from "./chunk-FWIISAZZ.js";
5
5
  import {
6
6
  Sentinel,
7
7
  createCliApproval
8
- } from "./chunk-NS6ZLMDK.js";
8
+ } from "./chunk-GRN5P3H2.js";
9
9
  import "./chunk-LATQNIRW.js";
10
10
  import {
11
11
  discoverPolicy
12
12
  } from "./chunk-FMZWHT4M.js";
13
- import "./chunk-QHE56MEO.js";
13
+ import "./chunk-QIYQWOLO.js";
14
14
  import {
15
15
  loadPolicy,
16
16
  loadPolicyFromString
17
- } from "./chunk-2FFMYSVC.js";
17
+ } from "./chunk-WLIDSTS4.js";
18
18
  import "./chunk-NUXSUSYY.js";
19
19
  export {
20
20
  Sentinel,
@@ -4,7 +4,7 @@ import {
4
4
  loadPolicyFromString,
5
5
  policyToConfig,
6
6
  policyToRole
7
- } from "./chunk-2FFMYSVC.js";
7
+ } from "./chunk-WLIDSTS4.js";
8
8
  export {
9
9
  LOCKED_ACTIONABLE_TYPES,
10
10
  loadPolicy,
@@ -12,4 +12,4 @@ export {
12
12
  policyToConfig,
13
13
  policyToRole
14
14
  };
15
- //# sourceMappingURL=policyLoader-6KR5VFVV.js.map
15
+ //# sourceMappingURL=policyLoader-KZL2U4M2.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuent/sentinel",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "AI agent behavioral security monitoring SDK",
5
5
  "author": "Tuent LLC",
6
6
  "keywords": [
@@ -1,10 +0,0 @@
1
- import {
2
- Sentinel
3
- } from "./chunk-NS6ZLMDK.js";
4
- import "./chunk-QHE56MEO.js";
5
- import "./chunk-2FFMYSVC.js";
6
- import "./chunk-NUXSUSYY.js";
7
- export {
8
- Sentinel
9
- };
10
- //# sourceMappingURL=Sentinel-QHMQ67W3.js.map