sentinelayer-cli 0.19.0 → 0.21.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/src/legacy-cli.js CHANGED
@@ -194,6 +194,7 @@ function parseCliArgs(argv) {
194
194
  }
195
195
 
196
196
  function printUsage() {
197
+ const writeUsageLine = (line = "") => process.stdout.write(`${line}\n`);
197
198
  console.log(`sentinelayer-cli v${CLI_VERSION}`);
198
199
  console.log("");
199
200
  console.log("Usage: sl <command> [options]");
@@ -223,8 +224,13 @@ function printUsage() {
223
224
  console.log(" sl session action <id> working_on --target-sequence <n> Claim work on a message");
224
225
  console.log(" sl session reply <id> <seq> \"msg\" Thread a response under a message");
225
226
  console.log(" sl session comment <id> <seq> \"msg\" Alias for threaded reply");
226
- console.log(" sl session view <id> <seq> Record a read receipt");
227
- console.log(" sl session read <id> --tail 20 Read session stream events");
227
+ console.log(" sl session read <id> --remote --agent <id> Read stream events and auto-record views");
228
+ console.log(" sl session view <id> <seq> Manually backfill a read receipt");
229
+ console.log(" sl session pins <id> --json List pinned messages with content (readable by agents)");
230
+ console.log(" sl session listen --session <id> --agent <id> Background-poll a session for new events");
231
+ console.log(" sl session recap now <id> --remote --json Summarize current owners, locks, and work");
232
+ console.log(" sl session daemon --session <id> Run Senti recaps/checkpoints for long rooms");
233
+ console.log(" sl session read <id> --tail 20 Read local session stream events");
228
234
  console.log(" sl session status <id> --json Show session health, agents, runs, leases");
229
235
  console.log(" sl session leave <id> Leave a session");
230
236
  console.log(" sl session list --json List active sessions");
@@ -253,13 +259,13 @@ function printUsage() {
253
259
  console.log(" sl audit frontend --path . --json Jules frontend audit (--stream for NDJSON, --url for runtime)");
254
260
  console.log(" sl audit security --path . --json Security-focused audit");
255
261
  console.log("");
256
- console.log("AIdenID (Identity Testing):");
257
- console.log(" sl ai identity provision --execute Provision ephemeral test email (auto-credentials after login)");
258
- console.log(" sl ai identity wait-for-otp <id> Poll for OTP extraction from provisioned email");
259
- console.log(" sl ai identity list List tracked identities");
260
- console.log(" sl ai identity lineage <id> Show identity parent/child tree");
261
- console.log(" sl ai identity revoke <id> Revoke a provisioned identity");
262
- console.log("");
262
+ writeUsageLine("AIdenID (Identity Testing):");
263
+ writeUsageLine(" sl ai identity provision --execute Provision ephemeral test email (auto-credentials after login)");
264
+ writeUsageLine(" sl ai identity wait-for-otp <id> Poll for OTP extraction from provisioned email");
265
+ writeUsageLine(" sl ai identity list List tracked identities");
266
+ writeUsageLine(" sl ai identity lineage <id> Show identity parent/child tree");
267
+ writeUsageLine(" sl ai identity revoke <id> Revoke a provisioned identity");
268
+ writeUsageLine("");
263
269
  console.log("Cost & Policy:");
264
270
  console.log(" sl cost show --json Show accumulated cost tracking");
265
271
  console.log(" sl policy list List available policy packs");
@@ -2338,17 +2344,18 @@ jobs:
2338
2344
  fi
2339
2345
  - name: Run Omar Gate
2340
2346
  id: omar
2341
- uses: mrrCarter/sentinelayer-v1-action@8595c4ad41e7b710ff6b1de0603da6ad8c0c3c07
2347
+ uses: mrrCarter/sentinelayer-v1-action@03d7369cba7de2e9f15b959275c982111f0ee493
2342
2348
  with:
2343
2349
  github_token: \${{ github.token }}
2344
2350
  sentinelayer_token: \${{ secrets.${normalizedSecret} }}${specIdBindingLine}
2345
2351
  sentinelayer_managed_llm: "false"
2346
2352
  openai_api_key: \${{ secrets.OPENAI_API_KEY }}
2353
+ google_api_key: \${{ secrets.GOOGLE_API_KEY }}
2347
2354
  scan_mode: \${{ github.event_name == 'workflow_dispatch' && inputs.scan_mode || 'deep' }}
2348
2355
  severity_gate: \${{ github.event_name == 'workflow_dispatch' && inputs.severity_gate || 'P1' }}
2349
2356
  model: gpt-5.3-codex
2350
2357
  codex_model: gpt-5.3-codex
2351
- model_fallback: gpt-5.2-codex
2358
+ model_fallback: gemini-2.5-flash
2352
2359
  llm_failure_policy: block
2353
2360
  - name: Enforce Omar reviewer merge thresholds
2354
2361
  shell: bash
@@ -401,6 +401,157 @@ export function buildAidenIdRegistryTemplate({ generatedAt = new Date().toISOStr
401
401
  };
402
402
  }
403
403
 
404
+ /**
405
+ * Create a local SentinelLayer session MCP registry template.
406
+ *
407
+ * @param {{ generatedAt?: string }} [options]
408
+ * @returns {Record<string, any>}
409
+ */
410
+ export function buildSentinelayerSessionRegistryTemplate({ generatedAt = new Date().toISOString() } = {}) {
411
+ return {
412
+ version: MCP_TOOL_REGISTRY_SCHEMA_VERSION,
413
+ generated_at: generatedAt,
414
+ tools: [
415
+ {
416
+ name: "poll_inbox",
417
+ title: "Poll Senti Inbox",
418
+ description:
419
+ "Poll durable SentinelLayer session events after an optional cursor and return events visible to one agent.",
420
+ input_schema: {
421
+ type: "object",
422
+ additionalProperties: false,
423
+ required: ["sessionId", "agentId"],
424
+ properties: {
425
+ sessionId: { type: "string" },
426
+ agentId: { type: "string" },
427
+ cursor: { type: "string" },
428
+ limit: { type: "integer", minimum: 1, maximum: 200 },
429
+ actionLimit: { type: "integer", minimum: 1, maximum: 200 },
430
+ includeActions: { type: "boolean" },
431
+ includeSelf: { type: "boolean" },
432
+ includeControlEvents: { type: "boolean" },
433
+ },
434
+ },
435
+ transport: {
436
+ type: "internal",
437
+ method: "POST",
438
+ url: "sentinelayer://session/poll_inbox",
439
+ timeout_ms: 15000,
440
+ auth: { mode: "none" },
441
+ },
442
+ budgets: {
443
+ max_calls_per_run: 60,
444
+ max_runtime_ms: 15000,
445
+ },
446
+ security: {
447
+ requires_human_approval: false,
448
+ kill_switch: "enabled",
449
+ scopes: ["session:read"],
450
+ },
451
+ metadata: {
452
+ provider: "sentinelayer",
453
+ adapter: "sentinelayer-cli",
454
+ server: "sentinelayer-session-mcp",
455
+ },
456
+ },
457
+ {
458
+ name: "send_message",
459
+ title: "Send Senti Message",
460
+ description:
461
+ "Send an authenticated agent session_message through the canonical SentinelLayer session event API.",
462
+ input_schema: {
463
+ type: "object",
464
+ additionalProperties: false,
465
+ required: ["sessionId", "agentId", "message"],
466
+ properties: {
467
+ sessionId: { type: "string" },
468
+ agentId: { type: "string" },
469
+ message: { type: "string" },
470
+ to: {
471
+ type: "array",
472
+ items: { type: "string" },
473
+ },
474
+ model: { type: "string" },
475
+ role: { type: "string" },
476
+ displayName: { type: "string" },
477
+ idempotencyKey: { type: "string" },
478
+ dryRun: { type: "boolean" },
479
+ },
480
+ },
481
+ transport: {
482
+ type: "internal",
483
+ method: "POST",
484
+ url: "sentinelayer://session/send_message",
485
+ timeout_ms: 15000,
486
+ auth: { mode: "none" },
487
+ },
488
+ budgets: {
489
+ max_calls_per_run: 20,
490
+ max_runtime_ms: 15000,
491
+ },
492
+ security: {
493
+ requires_human_approval: false,
494
+ kill_switch: "enabled",
495
+ scopes: ["session:write"],
496
+ },
497
+ metadata: {
498
+ provider: "sentinelayer",
499
+ adapter: "sentinelayer-cli",
500
+ server: "sentinelayer-session-mcp",
501
+ },
502
+ },
503
+ {
504
+ name: "attention_request",
505
+ title: "Request Senti Attention",
506
+ description:
507
+ "Create a help_request event for high-signal agent or human attention without chat polling.",
508
+ input_schema: {
509
+ type: "object",
510
+ additionalProperties: false,
511
+ required: ["sessionId", "agentId", "message"],
512
+ properties: {
513
+ sessionId: { type: "string" },
514
+ agentId: { type: "string" },
515
+ message: { type: "string" },
516
+ to: {
517
+ type: "array",
518
+ items: { type: "string" },
519
+ },
520
+ priority: { type: "string" },
521
+ severity: { type: "string" },
522
+ model: { type: "string" },
523
+ role: { type: "string" },
524
+ displayName: { type: "string" },
525
+ idempotencyKey: { type: "string" },
526
+ dryRun: { type: "boolean" },
527
+ },
528
+ },
529
+ transport: {
530
+ type: "internal",
531
+ method: "POST",
532
+ url: "sentinelayer://session/attention_request",
533
+ timeout_ms: 15000,
534
+ auth: { mode: "none" },
535
+ },
536
+ budgets: {
537
+ max_calls_per_run: 20,
538
+ max_runtime_ms: 15000,
539
+ },
540
+ security: {
541
+ requires_human_approval: false,
542
+ kill_switch: "enabled",
543
+ scopes: ["session:write"],
544
+ },
545
+ metadata: {
546
+ provider: "sentinelayer",
547
+ adapter: "sentinelayer-cli",
548
+ server: "sentinelayer-session-mcp",
549
+ },
550
+ },
551
+ ],
552
+ };
553
+ }
554
+
404
555
  /**
405
556
  * Create an AIdenID adapter contract template that binds MCP tools to provisioning endpoints.
406
557
  *