instar 1.3.1980 → 1.3.1982
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/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +29 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/machine.d.ts.map +1 -1
- package/dist/commands/machine.js +5 -1
- package/dist/commands/machine.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +9 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +28 -2
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/UpdateChecker.d.ts.map +1 -1
- package/dist/core/UpdateChecker.js +24 -0
- package/dist/core/UpdateChecker.js.map +1 -1
- package/dist/core/identityBuildFence.d.ts +97 -0
- package/dist/core/identityBuildFence.d.ts.map +1 -0
- package/dist/core/identityBuildFence.js +198 -0
- package/dist/core/identityBuildFence.js.map +1 -0
- package/dist/core/ownerRecordStore.d.ts +2 -0
- package/dist/core/ownerRecordStore.d.ts.map +1 -1
- package/dist/core/ownerRecordStore.js +2 -0
- package/dist/core/ownerRecordStore.js.map +1 -1
- package/dist/core/ownerRecordSync.d.ts +43 -1
- package/dist/core/ownerRecordSync.d.ts.map +1 -1
- package/dist/core/ownerRecordSync.js +115 -6
- package/dist/core/ownerRecordSync.js.map +1 -1
- package/dist/core/ownerRecordWiring.d.ts +19 -1
- package/dist/core/ownerRecordWiring.d.ts.map +1 -1
- package/dist/core/ownerRecordWiring.js +37 -2
- package/dist/core/ownerRecordWiring.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/monitoring/NativeHookEvents.d.ts +10 -0
- package/dist/monitoring/NativeHookEvents.d.ts.map +1 -1
- package/dist/monitoring/NativeHookEvents.js +37 -0
- package/dist/monitoring/NativeHookEvents.js.map +1 -1
- package/dist/monitoring/contextLayers/h3Builder.d.ts +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/dist/server/machineRoutes.d.ts.map +1 -1
- package/dist/server/machineRoutes.js +13 -0
- package/dist/server/machineRoutes.js.map +1 -1
- package/dist/server/ownerRecordRoutes.d.ts.map +1 -1
- package/dist/server/ownerRecordRoutes.js +2 -0
- package/dist/server/ownerRecordRoutes.js.map +1 -1
- package/dist/server/phoneSetupRoutes.d.ts.map +1 -1
- package/dist/server/phoneSetupRoutes.js +11 -0
- package/dist/server/phoneSetupRoutes.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +4 -1
- package/dist/server/routes.js.map +1 -1
- package/dist/server/sameNetworkListener.d.ts +39 -5
- package/dist/server/sameNetworkListener.d.ts.map +1 -1
- package/dist/server/sameNetworkListener.js +102 -16
- package/dist/server/sameNetworkListener.js.map +1 -1
- package/dist/server/sameNetworkRefusals.d.ts +59 -0
- package/dist/server/sameNetworkRefusals.d.ts.map +1 -0
- package/dist/server/sameNetworkRefusals.js +154 -0
- package/dist/server/sameNetworkRefusals.js.map +1 -0
- package/dist/testing/selfActionRegistry.d.ts.map +1 -1
- package/dist/testing/selfActionRegistry.js +27 -0
- package/dist/testing/selfActionRegistry.js.map +1 -1
- package/package.json +1 -1
- package/src/data/awareness/owner-record.md +1 -0
- package/src/data/awareness/same-network-first-phone.md +1 -0
- package/src/data/builtin-manifest.json +65 -65
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1981.md +37 -0
- package/upgrades/1.3.1982.md +26 -0
- package/upgrades/side-effects/home-listener-phone-limits.md +59 -0
- package/upgrades/side-effects/hook-reporter-event-delivery.md +139 -0
- package/upgrades/side-effects/identity-security-piece2c-minimum-build-fence.md +120 -0
package/dist/commands/init.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export declare function loadRelayTemplate(filename: string, port: number): strin
|
|
|
148
148
|
* no session on it can answer. Both locations, as PostUpdateMigrator.migrateScripts keeps them.
|
|
149
149
|
*/
|
|
150
150
|
export declare function installTelegramRelayForJoinedMachine(projectDir: string, stateDir: string, port: number): void;
|
|
151
|
+
export declare function getHookEventReporterScript(): string;
|
|
151
152
|
/**
|
|
152
153
|
* The normal-Chrome helper scripts shipped in src/templates/scripts/browser/: the three macOS tools
|
|
153
154
|
* (Apple Events), the Windows driver written by PP (native-drive.ps1, real OS input + UI Automation)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAoDpF,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,CAAC;IAC1F,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;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AAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAqElF;AA6KD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBxE;AAaD;;;GAGG;AACH,wBAAgB,oCAAoC,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAK7G;AAqdD,wBAAgB,0BAA0B,IAAI,MAAM,CA6GnD;AAohBD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAU,CAAC;AAC/L,sGAAsG;AACtG,eAAO,MAAM,8BAA8B,YAAI,qBAAqB,CAAU,CAAC;AAC/E,kGAAkG;AAClG,eAAO,MAAM,0BAA0B,YAAI,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,CAAU,CAAC;AAC/G;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,YAAI,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,CAAU,CAAC;AAElI;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BlE"}
|
package/dist/commands/init.js
CHANGED
|
@@ -4537,7 +4537,7 @@ fi
|
|
|
4537
4537
|
fs.writeFileSync(path.join(hooksDir, 'model-tier-skill-entry.sh'), migrator.getHookContent('model-tier-skill-entry'), { mode: 0o755 });
|
|
4538
4538
|
fs.writeFileSync(path.join(hooksDir, 'model-tier-reconciler.js'), migrator.getHookContent('model-tier-reconciler'), { mode: 0o755 });
|
|
4539
4539
|
}
|
|
4540
|
-
function getHookEventReporterScript() {
|
|
4540
|
+
export function getHookEventReporterScript() {
|
|
4541
4541
|
return `#!/usr/bin/env node
|
|
4542
4542
|
// Hook Event Reporter — command hook replacement for HTTP hooks.
|
|
4543
4543
|
//
|
|
@@ -4554,7 +4554,9 @@ function getHookEventReporterScript() {
|
|
|
4554
4554
|
|
|
4555
4555
|
const serverUrl = process.env.INSTAR_SERVER_URL || 'http://localhost:4042';
|
|
4556
4556
|
const authToken = process.env.INSTAR_AUTH_TOKEN || '';
|
|
4557
|
-
|
|
4557
|
+
// Validated once: an id that fails the pattern is sent in neither the query nor the body (the hook exits).
|
|
4558
|
+
const rawSid = process.env.INSTAR_SESSION_ID || '';
|
|
4559
|
+
const instarSid = /^[A-Za-z0-9._:-]{1,128}$/.test(rawSid) ? rawSid : '';
|
|
4558
4560
|
|
|
4559
4561
|
if (!authToken || !instarSid) {
|
|
4560
4562
|
// Missing env vars — skip silently
|
|
@@ -4567,8 +4569,32 @@ process.stdin.on('end', async () => {
|
|
|
4567
4569
|
try {
|
|
4568
4570
|
const { request } = await import('node:http');
|
|
4569
4571
|
const input = JSON.parse(data);
|
|
4572
|
+
// Bound the forwarded identifying fields here too: an older server stores a payload as received.
|
|
4573
|
+
const str = (v, max) => (typeof v === 'string' && v.length > 0 && v.length <= max ? v : undefined);
|
|
4574
|
+
const id = (v) => (typeof v === 'string' && /^[A-Za-z0-9._:-]{1,128}$/.test(v) ? v : undefined);
|
|
4575
|
+
const absPath = (v) => (typeof v === 'string' && v.startsWith('/') && v.length <= 1024 ? v : undefined);
|
|
4570
4576
|
const payload = JSON.stringify({
|
|
4571
|
-
event
|
|
4577
|
+
// Claude Code names the event in hook_event_name (hook_event is the old
|
|
4578
|
+
// spelling, kept as a fallback). Without it every Stop, SubagentStart,
|
|
4579
|
+
// SubagentStop, TaskCompleted, SessionEnd and PreCompact event arrived as
|
|
4580
|
+
// \"Unknown\" and no consumer of those events ever ran (2026-11-21).
|
|
4581
|
+
event: input.hook_event_name || input.hook_event || (input.tool_name ? 'PostToolUse' : 'Unknown'),
|
|
4582
|
+
// The instar session this hook ran in, so consumers keyed on it (the
|
|
4583
|
+
// practice-fold runner, the subagent tracker) can find the session.
|
|
4584
|
+
instar_session_id: id(instarSid),
|
|
4585
|
+
// The tmux session name, which Compaction Trigger 1 checks against the session id.
|
|
4586
|
+
instar_session: str(process.env.INSTAR_SESSION_NAME, 128),
|
|
4587
|
+
// Short identifying fields the native reporter also forwards (docs/specs/native-hook-events.md
|
|
4588
|
+
// D1); the server bounds them the same way. Message text (last_assistant_message,
|
|
4589
|
+
// task_subject) is deliberately NOT sent from here: an older server stores payloads as
|
|
4590
|
+
// received, so raw text could reach storage during a version mismatch.
|
|
4591
|
+
agent_id: id(input.agent_id),
|
|
4592
|
+
agent_type: str(input.agent_type, 128),
|
|
4593
|
+
agent_transcript_path: absPath(input.agent_transcript_path),
|
|
4594
|
+
task_id: id(input.task_id),
|
|
4595
|
+
reason: str(input.reason, 64),
|
|
4596
|
+
trigger: str(input.trigger, 64),
|
|
4597
|
+
|
|
4572
4598
|
session_id: input.session_id || '',
|
|
4573
4599
|
tool_name: input.tool_name || '',
|
|
4574
4600
|
// green-pr-automerge Layer 2: forward the session cwd so the server can
|