instar 1.3.485 → 1.3.487
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/commands/reflect.d.ts.map +1 -1
- package/dist/commands/reflect.js +4 -0
- package/dist/commands/reflect.js.map +1 -1
- package/dist/commands/route.d.ts.map +1 -1
- package/dist/commands/route.js +3 -0
- package/dist/commands/route.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +14 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/CircuitBreakingIntelligenceProvider.d.ts +7 -0
- package/dist/core/CircuitBreakingIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/CircuitBreakingIntelligenceProvider.js +50 -0
- package/dist/core/CircuitBreakingIntelligenceProvider.js.map +1 -1
- package/dist/core/ClaudeCliIntelligenceProvider.d.ts +5 -0
- package/dist/core/ClaudeCliIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/ClaudeCliIntelligenceProvider.js +6 -1
- package/dist/core/ClaudeCliIntelligenceProvider.js.map +1 -1
- package/dist/core/CodexCliIntelligenceProvider.d.ts +58 -0
- package/dist/core/CodexCliIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/CodexCliIntelligenceProvider.js +293 -27
- package/dist/core/CodexCliIntelligenceProvider.js.map +1 -1
- package/dist/core/GeminiCliIntelligenceProvider.d.ts +8 -0
- package/dist/core/GeminiCliIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/GeminiCliIntelligenceProvider.js +8 -0
- package/dist/core/GeminiCliIntelligenceProvider.js.map +1 -1
- package/dist/core/MessagingToneGate.d.ts +23 -2
- package/dist/core/MessagingToneGate.d.ts.map +1 -1
- package/dist/core/MessagingToneGate.js +15 -1
- package/dist/core/MessagingToneGate.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +61 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SafeGitExecutor.d.ts.map +1 -1
- package/dist/core/SafeGitExecutor.js +79 -1
- package/dist/core/SafeGitExecutor.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +22 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/TelegramRelay.d.ts +1 -0
- package/dist/core/TelegramRelay.d.ts.map +1 -1
- package/dist/core/TelegramRelay.js +9 -1
- package/dist/core/TelegramRelay.js.map +1 -1
- package/dist/core/componentCategories.d.ts.map +1 -1
- package/dist/core/componentCategories.js +10 -0
- package/dist/core/componentCategories.js.map +1 -1
- package/dist/core/intelligenceProviderFactory.d.ts +8 -0
- package/dist/core/intelligenceProviderFactory.d.ts.map +1 -1
- package/dist/core/intelligenceProviderFactory.js +1 -0
- package/dist/core/intelligenceProviderFactory.js.map +1 -1
- package/dist/core/raw-file-path.d.ts +33 -0
- package/dist/core/raw-file-path.d.ts.map +1 -0
- package/dist/core/raw-file-path.js +105 -0
- package/dist/core/raw-file-path.js.map +1 -0
- package/dist/core/types.d.ts +17 -9
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/messaging/OutboundAdvisory.d.ts +152 -0
- package/dist/messaging/OutboundAdvisory.d.ts.map +1 -0
- package/dist/messaging/OutboundAdvisory.js +453 -0
- package/dist/messaging/OutboundAdvisory.js.map +1 -0
- package/dist/messaging/TelegramAdapter.d.ts +6 -0
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +4 -1
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/messaging/pending-relay-store.d.ts +7 -0
- package/dist/messaging/pending-relay-store.d.ts.map +1 -1
- package/dist/messaging/pending-relay-store.js +9 -3
- package/dist/messaging/pending-relay-store.js.map +1 -1
- package/dist/messaging/slack/SlackAdapter.d.ts +3 -0
- package/dist/messaging/slack/SlackAdapter.d.ts.map +1 -1
- package/dist/messaging/slack/SlackAdapter.js +8 -1
- package/dist/messaging/slack/SlackAdapter.js.map +1 -1
- package/dist/monitoring/FeatureMetricsLedger.d.ts +123 -1
- package/dist/monitoring/FeatureMetricsLedger.d.ts.map +1 -1
- package/dist/monitoring/FeatureMetricsLedger.js +211 -25
- package/dist/monitoring/FeatureMetricsLedger.js.map +1 -1
- package/dist/monitoring/delivery-failure-sentinel.d.ts +6 -1
- package/dist/monitoring/delivery-failure-sentinel.d.ts.map +1 -1
- package/dist/monitoring/delivery-failure-sentinel.js +15 -3
- package/dist/monitoring/delivery-failure-sentinel.js.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/index.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/index.js +1 -0
- package/dist/providers/adapters/anthropic-interactive-pool/index.js.map +1 -1
- package/dist/providers/adapters/openai-codex/transport/codexSpawn.d.ts +93 -0
- package/dist/providers/adapters/openai-codex/transport/codexSpawn.d.ts.map +1 -1
- package/dist/providers/adapters/openai-codex/transport/codexSpawn.js +339 -0
- package/dist/providers/adapters/openai-codex/transport/codexSpawn.js.map +1 -1
- package/dist/providers/adapters/openai-codex/transport/codexUsageParser.d.ts +84 -0
- package/dist/providers/adapters/openai-codex/transport/codexUsageParser.d.ts.map +1 -0
- package/dist/providers/adapters/openai-codex/transport/codexUsageParser.js +208 -0
- package/dist/providers/adapters/openai-codex/transport/codexUsageParser.js.map +1 -0
- package/dist/providers/uxConfirm/OverrideDetector.d.ts.map +1 -1
- package/dist/providers/uxConfirm/OverrideDetector.js +1 -0
- package/dist/providers/uxConfirm/OverrideDetector.js.map +1 -1
- package/dist/providers/uxConfirm/TaskClassifier.d.ts.map +1 -1
- package/dist/providers/uxConfirm/TaskClassifier.js +1 -0
- package/dist/providers/uxConfirm/TaskClassifier.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +10 -3
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scheduler/JobScheduler.d.ts.map +1 -1
- package/dist/scheduler/JobScheduler.js +8 -0
- package/dist/scheduler/JobScheduler.js.map +1 -1
- package/dist/security/LLMSanitizer.d.ts.map +1 -1
- package/dist/security/LLMSanitizer.js +7 -1
- package/dist/security/LLMSanitizer.js.map +1 -1
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +22 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.js +1 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +12 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +226 -4
- package/dist/server/routes.js.map +1 -1
- package/dist/threadline/PipeSessionSpawner.d.ts.map +1 -1
- package/dist/threadline/PipeSessionSpawner.js +2 -0
- package/dist/threadline/PipeSessionSpawner.js.map +1 -1
- package/dist/threadline/WarrantsReplyGate.d.ts.map +1 -1
- package/dist/threadline/WarrantsReplyGate.js +5 -1
- package/dist/threadline/WarrantsReplyGate.js.map +1 -1
- package/package.json +4 -2
- package/scripts/lint-llm-attribution.js +418 -0
- package/scripts/lint-no-direct-destructive.js +4 -0
- package/scripts/pre-push-gate.js +24 -0
- package/src/data/builtin-manifest.json +67 -67
- package/src/scaffold/templates.ts +10 -3
- package/src/templates/scripts/telegram-reply.sh +202 -10
- package/upgrades/1.3.486.md +38 -0
- package/upgrades/1.3.487.md +39 -0
- package/upgrades/side-effects/outbound-advisory-inform-only.md +252 -0
- package/upgrades/side-effects/token-audit-completeness.md +84 -0
|
@@ -3017,6 +3017,15 @@ setTimeout(() => process.exit(0), 2000);
|
|
|
3017
3017
|
patched = true;
|
|
3018
3018
|
result.upgraded.push('CLAUDE.md: added Real-Check Verification section');
|
|
3019
3019
|
}
|
|
3020
|
+
// Outbound advisory (outbound-jargon-filepath-gap §5) — the inform-only
|
|
3021
|
+
// preflight for automated job sends. An agent that never learns what a
|
|
3022
|
+
// "NOT SENT — advisory" transcript line means will treat it as an error
|
|
3023
|
+
// and improvise; this section is the awareness (Agent Awareness Standard).
|
|
3024
|
+
if (!content.includes('Outbound advisory for automated messages')) {
|
|
3025
|
+
content += `\n**Outbound advisory for automated messages (inform-only)** — When a background job of mine sends a Telegram message, the relay script first runs deterministic checks over the text (raw file paths, dev jargon, machine-local links). If something is flagged, the message is NOT sent yet: an advisory lands in the job session's transcript whose FIRST line is the literal \`NOT SENT — advisory (fix and re-run, or re-run with --ack-advisory to send unchanged)\`. The sender keeps final authority — the advisory layer never blocks, never escalates against the sender, and every error path delivers.\n- **If I see a NOT SENT advisory in my transcript** (PROACTIVE — this is the trigger): FIX the message and re-run the script — restate jargon in plain English; replace a raw file path by publishing a private view and sending the link; replace a localhost link with the public tunnel URL (a localhost link is the one finding \`--ack-advisory\` can NOT deliver — a pre-existing server guard refuses it regardless). Only \`--ack-advisory\` when the flagged content is genuinely right for the user (the override is audited).\n- Audit trail: \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/messaging/advisory-log?limit=50"\`. A job that repeatedly drops its own advised messages raises ONE deduped Attention item to the operator.\n- Conversational replies are completely unaffected — the preflight only runs for scheduler-stamped automated job sends.\n- Off-switch: \`messaging.outboundAdvisory.enabled: false\` in \`.instar/config.json\` (read live — no restart).\n`;
|
|
3026
|
+
patched = true;
|
|
3027
|
+
result.upgraded.push('CLAUDE.md: added Outbound advisory for automated messages section');
|
|
3028
|
+
}
|
|
3020
3029
|
// Cartographer doc-tree (cartographer-doc-tree-schema spec #1) — a hierarchical
|
|
3021
3030
|
// semantic map with git-hash staleness. Ships dark; documented so agents that
|
|
3022
3031
|
// enable it know the routes exist (Agent Awareness Standard).
|
|
@@ -3528,6 +3537,31 @@ Audit what each LLM-driven gate/sentinel actually does: WHICH provider + model r
|
|
|
3528
3537
|
patched = true;
|
|
3529
3538
|
result.upgraded.push('CLAUDE.md: added Per-Feature LLM Metrics (/metrics/features) awareness (llm-feature-metrics + observable-intelligence)');
|
|
3530
3539
|
}
|
|
3540
|
+
// token-audit-completeness (Agent Awareness + Migration Parity): existing
|
|
3541
|
+
// agents must learn the per-model token breakdown, usageCoverage, and the
|
|
3542
|
+
// unlabeled-spend shares. Append-only addendum (house policy — the base
|
|
3543
|
+
// Per-Feature section above is never edited in place). Content-sniff on
|
|
3544
|
+
// the literal `unlabeledCallShare` — a REAL field name the addendum text
|
|
3545
|
+
// emits AND the updated templates.ts base section emits, so a freshly-
|
|
3546
|
+
// initialized agent self-matches and is never double-patched (an earlier
|
|
3547
|
+
// candidate, `unlabeledShare`, is a substring of NEITHER actual field —
|
|
3548
|
+
// an addendum written with the real names would never self-match and the
|
|
3549
|
+
// migration would re-append on every update run, violating idempotency).
|
|
3550
|
+
if (!content.includes('unlabeledCallShare')) {
|
|
3551
|
+
const tokenAuditSection = `
|
|
3552
|
+
### Token-Audit Completeness — per-model token breakdown & usage coverage
|
|
3553
|
+
|
|
3554
|
+
\`/metrics/features\` answers cost questions per feature AND per model (operator directive: an unmetered LLM call is an unaccountable one — see the Token-Audit Completeness standard in the constitution):
|
|
3555
|
+
- Each feature row carries \`byModel\` (feature×model×framework: calls, tokensIn/tokensOut/tokensCached); \`totals.byModel\` is the cross-feature aggregate. \`tokensCached\` is the cache-read SUBSET of \`tokensIn\` (fresh cost = tokensIn − tokensCached).
|
|
3556
|
+
- \`totals.usageCoverage\` reports, per framework, the share of successful calls that recorded REAL token usage. Codex-routed calls report per-call tokens (exec --json); 0 coverage on a non-exempt framework is the drift alarm, not noise. gemini-cli is the documented cannot-surface exemption. Failed calls still carry their already-burned tokens (error rows record cost).
|
|
3557
|
+
- \`totals.unlabeledTokenShare\` + \`totals.unlabeledCallShare\` track unattributed spend — the baseline is ZERO and a lint ratchet keeps every new LLM callsite tagged with \`attribution.component\`.
|
|
3558
|
+
- Rollback lever for codex exec-json mode: \`intelligence.codexExecJson: false\` in \`.instar/config.json\` (or env \`INSTAR_CODEX_EXEC_JSON=0\`) restores the plain invocation — codex calls then go token-blind and \`usageCoverage\` shows it honestly.
|
|
3559
|
+
- **When to use** (PROACTIVE): "how many tokens did feature X spend, on which model?" / "are we audit-blind anywhere?" / before enabling any cost-bearing background feature (e.g. the cartographer freshness sweep) → read \`byModel\` + \`usageCoverage\` instead of guessing. Spec: \`docs/specs/token-audit-completeness.md\`.
|
|
3560
|
+
`;
|
|
3561
|
+
content += '\n' + tokenAuditSection;
|
|
3562
|
+
patched = true;
|
|
3563
|
+
result.upgraded.push('CLAUDE.md: added Token-Audit Completeness (per-model breakdown + usageCoverage) awareness (token-audit-completeness)');
|
|
3564
|
+
}
|
|
3531
3565
|
// correction-capture-backlog (Agent Awareness + Migration Parity): existing
|
|
3532
3566
|
// agents with the Correction & Preference Learning block need to learn that a
|
|
3533
3567
|
// rate-limited capture is now backlogged + distilled later (not dropped), so
|
|
@@ -5065,6 +5099,12 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
5065
5099
|
// the enrollment wizard (never ask the user to paste a token). Mirrored to
|
|
5066
5100
|
// the shadows like every agent-facing capability.
|
|
5067
5101
|
'**Subscription Pool (multi-account quota + auto-swap + enrollment)**',
|
|
5102
|
+
// Outbound advisory (outbound-jargon-filepath-gap §5): the inform-only
|
|
5103
|
+
// preflight is framework-agnostic (the env + relay script do the work),
|
|
5104
|
+
// so a Codex/Gemini job session also needs to know what a "NOT SENT —
|
|
5105
|
+
// advisory" line means and that fix-then-re-run / --ack-advisory are
|
|
5106
|
+
// the two moves. Mirrored like every agent-facing capability.
|
|
5107
|
+
'**Outbound advisory for automated messages (inform-only)**',
|
|
5068
5108
|
// Working-Set Handoff (WORKING-SET-HANDOFF-SPEC §3.7): the fetch reflex
|
|
5069
5109
|
// (POST /coherence/fetch-working-set). A Codex/Gemini agent that never
|
|
5070
5110
|
// learns it will tell the user the files "aren't on this machine"
|
|
@@ -5111,6 +5151,21 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
5111
5151
|
// KPI. A Codex/Gemini agent that never learns /metrics/learning-velocity
|
|
5112
5152
|
// can't answer "are we actually learning?" with real numbers.
|
|
5113
5153
|
'**Learning-Velocity Metric (EXO 3.0',
|
|
5154
|
+
// Per-Feature LLM Metrics base section (token-audit-completeness): the
|
|
5155
|
+
// shadow mirror never carried it. TWO tail-truncated, line-leading
|
|
5156
|
+
// literals cover both deployed variants — templates' bold-block form and
|
|
5157
|
+
// migrateClaudeMd's H3 form (each CLAUDE.md contains exactly one, so
|
|
5158
|
+
// exactly one literal fires; the other no-ops). Tail-truncation is the
|
|
5159
|
+
// list's sanctioned multi-variant trick (cf. the MTP marker); a
|
|
5160
|
+
// HEAD-truncated bare phrase would anchor mid-heading and match the
|
|
5161
|
+
// phrase inside OTHER sections' body prose, truncating their slices.
|
|
5162
|
+
'**Per-Feature LLM Metrics',
|
|
5163
|
+
'### Per-Feature LLM Metrics',
|
|
5164
|
+
// Token-audit addendum (per-model breakdown + usageCoverage): a Codex/
|
|
5165
|
+
// Gemini agent that never learns byModel/usageCoverage can't answer
|
|
5166
|
+
// "how much did feature X spend on which model?" or spot audit-blind
|
|
5167
|
+
// frameworks.
|
|
5168
|
+
'### Token-Audit Completeness — per-model token breakdown & usage coverage',
|
|
5114
5169
|
];
|
|
5115
5170
|
for (const shadowName of ['AGENTS.md', 'GEMINI.md']) {
|
|
5116
5171
|
const shadowPath = path.join(this.config.projectDir, shadowName);
|
|
@@ -8935,6 +8990,12 @@ process.stdin.on('end', async () => {
|
|
|
8935
8990
|
// recoverable queue, neutral relay mirror; no --stdin-base64 mode).
|
|
8936
8991
|
// Shipped through v1.3.266.
|
|
8937
8992
|
'0f6d27a522b123551871e6081774f8c89d1ad0ce248597af7dd60d8522871069',
|
|
8993
|
+
// --stdin-base64 version (pre-outbound-advisory). Shipped through
|
|
8994
|
+
// v1.3.484. Required so the outbound-advisory preflight template
|
|
8995
|
+
// (outbound-jargon-filepath-gap §5) reaches existing agents — without
|
|
8996
|
+
// this entry a stock deployed script reads as "unknown" and only gets a
|
|
8997
|
+
// `.new` candidate, and the preflight never activates in the field.
|
|
8998
|
+
'3e30b2cd29e1745a3799eae98e4e10ded2ab713cbcd55ac17d21c5aab8ca0526',
|
|
8938
8999
|
]);
|
|
8939
9000
|
/**
|
|
8940
9001
|
* SHA-based migrator for telegram-reply.sh — replaces marker-string
|