instar 1.3.759 → 1.3.761
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/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +22 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/DoorwayRegistryReader.d.ts +66 -0
- package/dist/core/DoorwayRegistryReader.d.ts.map +1 -0
- package/dist/core/DoorwayRegistryReader.js +243 -0
- package/dist/core/DoorwayRegistryReader.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts +23 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +69 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +24 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +9 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +30 -0
- package/dist/server/routes.js.map +1 -1
- package/dist/testing/selfActionRegistry.d.ts +88 -0
- package/dist/testing/selfActionRegistry.d.ts.map +1 -0
- package/dist/testing/selfActionRegistry.js +202 -0
- package/dist/testing/selfActionRegistry.js.map +1 -0
- package/package.json +2 -2
- package/scripts/class-closure-declare.mjs +69 -4
- package/scripts/class-closure-lint.mjs +61 -5
- package/scripts/instar-dev-precommit.js +100 -2
- package/scripts/lib/self-action-detect.mjs +162 -0
- package/scripts/lint-no-unregistered-self-action.js +204 -0
- package/skills/instar-dev/templates/side-effects-artifact.md +8 -1
- package/src/data/builtin-manifest.json +63 -63
- package/src/scaffold/templates.ts +2 -1
- package/upgrades/1.3.760.md +100 -0
- package/upgrades/1.3.761.md +34 -0
- package/upgrades/side-effects/doorway-model-registry-inc3.md +82 -0
- package/upgrades/side-effects/self-action-convergence.md +62 -0
|
@@ -136,6 +136,22 @@ A durable per-agent registry mapping each Playwright browser **profile** (a phys
|
|
|
136
136
|
- **At-rest honesty**: the registry file is plaintext machine-local; it lists account identities + vault key NAMES, so filesystem access to the machine reveals the agent's access *map* — never the credentials (same posture as SelfKnowledgeTree/operationalFacts and the relationships store).
|
|
137
137
|
`;
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* CLAUDE.md awareness block for the Doorway/Model Knowledge Registry + the `GET /doorways`
|
|
141
|
+
* read + the dark scan job (docs/specs/DOORWAY-MODEL-KNOWLEDGE-REGISTRY-SPEC.md §Agent
|
|
142
|
+
* Awareness). A POINTER, not an inlined door/model table (avoid CLAUDE.md bloat). The unique
|
|
143
|
+
* heading substring `Doorway/Model Knowledge Registry` is the content-sniff marker used by
|
|
144
|
+
* migrateClaudeMd (Migration Parity).
|
|
145
|
+
*/
|
|
146
|
+
export function DOORWAY_REGISTRY_CLAUDEMD_SECTION(port) {
|
|
147
|
+
return `\n### Doorway/Model Knowledge Registry — what models can I reach? (\`GET /doorways\`)
|
|
148
|
+
|
|
149
|
+
A durable map from each of my **doorways** (the ways I reach LLMs — Claude Code, Codex, Gemini, a paid API key, …) to the top **models** that door can currently reach — so "what models can I actually reach right now?" is a READ, not a guess. Two layers: a git-tracked **canonical** manifest (the reviewed model list per door, with pricing) and a machine-local **live scan-state** (this machine's freshly-probed reachability per door). The canonical layer is ALWAYS authoritative for routing; the live scan-state is observability only, never a routing input.
|
|
150
|
+
- Read the merged map: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/doorways\` → \`{ scanState, lastScanAt, doorways:[{ doorId, topModels:[{ id, role, frontier, pricing, verifiedAt }], reachable, probeStatus, lastScannedAt }] }\`. **Two honest states:** \`200\` with \`scanState:"never-run"\` (registry present, no scan yet — live fields are \`reachable:null\`/\`probeStatus:"never-scanned"\` until a scan runs), then \`200\` merged once a scan has run; \`503\` with \`code:"registry-unavailable-no-instar-source"\` (a pure end-user install carries no manifest) or \`code:"registry-corrupt"\` (manifest present but unparseable). It NEVER fabricates an empty map.
|
|
151
|
+
- **Keeping the map current** is a recurring \`doorway-scan\` job that re-probes each door and surfaces ONE plain-English heads-up only when something changes. It ships **OFF by default** (dark for the fleet; the job manifest is \`enabled:false\`) — enable it per maintainer agent via the \`doorway-scan\` job manifest (free-probes spends zero metered budget; metered probes are manual-only + budget-fail-closed). The \`maintenance.doorwayScan\` config block (\`scope\`/\`cadence\`/\`digestTopicId\`/\`budgetCapUsd\`) tunes it; an explicit \`maintenance.doorwayScan.enabled:false\` is a master kill-switch (deny-wins).
|
|
152
|
+
- **When to use** (PROACTIVE — this is the trigger): user asks "what models can I reach?" / "is my model map current?" / "which doorways are live?" → read \`GET /doorways\`, don't guess. A \`503 registry-unavailable-no-instar-source\` just means this is a pure end-user install with no source registry.
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
139
155
|
/**
|
|
140
156
|
* CLAUDE.md note for the second wedge-signature family (2026-06-05 EXO
|
|
141
157
|
* incident) + the API fresh-respawn lever. Appended to NEW installs as part of
|
|
@@ -752,6 +768,7 @@ export class PostUpdateMigrator {
|
|
|
752
768
|
this.migrateTestAsSelfSkill(result);
|
|
753
769
|
this.migrateInstarDevBuildLocationRegrounding(result);
|
|
754
770
|
this.migrateInstarDevInternalOnlyReleaseNoteLane(result);
|
|
771
|
+
this.migrateClassClosureTemplateSelfActionClause(result);
|
|
755
772
|
this.migrateSpecConvergeFoundationAudit(result);
|
|
756
773
|
this.migrateAutonomousStopHookTopicKeyed(result);
|
|
757
774
|
this.migrateSelfKnowledgeTree(result);
|
|
@@ -2926,6 +2943,49 @@ export class PostUpdateMigrator {
|
|
|
2926
2943
|
result.errors.push(`skills/instar-dev/SKILL.md migration: ${err instanceof Error ? err.message : String(err)}`);
|
|
2927
2944
|
}
|
|
2928
2945
|
}
|
|
2946
|
+
/**
|
|
2947
|
+
* Extend the deployed instar-dev side-effects template's "Class-Closure
|
|
2948
|
+
* Declaration" trigger note with the self-action clause (docs/specs/
|
|
2949
|
+
* self-action-convergence.md → E5): the declaration is REQUIRED not only when
|
|
2950
|
+
* FIXING an agent-authored-artifact defect but also when ADDING/modifying a
|
|
2951
|
+
* self-triggered controller (the `unbounded-self-action` class). New agents get
|
|
2952
|
+
* it via installBuiltinSkills (install-if-missing); EXISTING agents only get
|
|
2953
|
+
* updated CONTENT here (Migration Parity → "updating existing skill content").
|
|
2954
|
+
*
|
|
2955
|
+
* Same shape as migrateMultiMachinePostureReviewDimension: re-copy the bundled
|
|
2956
|
+
* template only when the installed copy lacks the self-action MARKER and still
|
|
2957
|
+
* looks stock (fingerprint guard). A customized template is left untouched.
|
|
2958
|
+
* Idempotent: the marker check short-circuits on every later run.
|
|
2959
|
+
*/
|
|
2960
|
+
migrateClassClosureTemplateSelfActionClause(result) {
|
|
2961
|
+
const MARKER = 'unbounded-self-action';
|
|
2962
|
+
const FINGERPRINT = 'Class-Closure Declaration';
|
|
2963
|
+
const rel = ['skills', 'instar-dev', 'templates', 'side-effects-artifact.md'];
|
|
2964
|
+
const label = 'instar-dev side-effects template (Class-Closure self-action clause)';
|
|
2965
|
+
try {
|
|
2966
|
+
const installed = path.join(this.config.projectDir, '.claude', ...rel);
|
|
2967
|
+
if (!fs.existsSync(installed))
|
|
2968
|
+
return; // fresh installs get the bundled copy
|
|
2969
|
+
const current = fs.readFileSync(installed, 'utf8');
|
|
2970
|
+
if (current.includes(MARKER))
|
|
2971
|
+
return; // already updated — idempotent
|
|
2972
|
+
if (!current.includes(FINGERPRINT)) {
|
|
2973
|
+
result.skipped.push(`${label}: no Class-Closure section (older template) — left untouched`);
|
|
2974
|
+
return;
|
|
2975
|
+
}
|
|
2976
|
+
const bundled = path.join(__dirname, '..', '..', ...rel);
|
|
2977
|
+
if (!fs.existsSync(bundled))
|
|
2978
|
+
return;
|
|
2979
|
+
const next = fs.readFileSync(bundled, 'utf8');
|
|
2980
|
+
if (next.includes(MARKER)) {
|
|
2981
|
+
fs.writeFileSync(installed, next);
|
|
2982
|
+
result.upgraded.push(label);
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
catch (err) {
|
|
2986
|
+
result.errors.push(`${label}: ${err instanceof Error ? err.message : String(err)}`);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2929
2989
|
/**
|
|
2930
2990
|
* Update the deployed spec-converge skill so existing agents get the
|
|
2931
2991
|
* Lessons-aware reviewer's clause (d) FOUNDATION/SUBSYSTEM AUDIT — the review
|
|
@@ -4404,6 +4464,15 @@ setTimeout(() => process.exit(0), 2000);
|
|
|
4404
4464
|
patched = true;
|
|
4405
4465
|
result.upgraded.push('CLAUDE.md: added Machine Load Assessment section');
|
|
4406
4466
|
}
|
|
4467
|
+
// Doorway/Model Knowledge Registry (DOORWAY-MODEL-KNOWLEDGE-REGISTRY-SPEC.md §Agent
|
|
4468
|
+
// Awareness) — Agent Awareness Standard + Migration Parity: existing agents learn the
|
|
4469
|
+
// registry + GET /doorways + the dark doorway-scan job via this appended section. Same
|
|
4470
|
+
// text as generateClaudeMd. Content-sniff on the unique heading keeps it idempotent.
|
|
4471
|
+
if (!content.includes('Doorway/Model Knowledge Registry')) {
|
|
4472
|
+
content += DOORWAY_REGISTRY_CLAUDEMD_SECTION(port);
|
|
4473
|
+
patched = true;
|
|
4474
|
+
result.upgraded.push('CLAUDE.md: added Doorway/Model Knowledge Registry section');
|
|
4475
|
+
}
|
|
4407
4476
|
// The Agent Carries the Loop (agent-owned-followthrough C1+C2) — agent
|
|
4408
4477
|
// awareness for the owner⟂blockedOn commitment model + the probe + that the
|
|
4409
4478
|
// user is never status-pinged for an agent-owned commitment. Content-sniffed.
|