@crewhaus/ir 0.4.0 → 0.5.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/dist/index.d.ts +76 -2
- package/dist/readme.js +7 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -666,6 +666,13 @@ export type IrThredz = {
|
|
|
666
666
|
* agent memory is never public by accident (Thredz's own API defaults
|
|
667
667
|
* new articles to globally-shared). */
|
|
668
668
|
readonly visibility: IrThredzVisibility;
|
|
669
|
+
/** 0.5.0 — the Thredz wiki space (Pro/Scale) this agent's memory is scoped
|
|
670
|
+
* to; becomes `THREDZ_DEFAULT_SPACE`. Absent → unspaced, i.e. the legacy
|
|
671
|
+
* account-wide wiki, which is also the only path on Free/Starter. Inside a
|
|
672
|
+
* space the space's TYPE decides visibility, so {@link visibility} stops
|
|
673
|
+
* applying — it is still carried, because the two are independent knobs and
|
|
674
|
+
* a bundle may be pointed at a space after the fact. */
|
|
675
|
+
readonly space?: string;
|
|
669
676
|
/** RESOLVED — mirror continuity goal writes to Thredz `goal_write`/
|
|
670
677
|
* `goal_update` (spec-scoped only, §14.5 decision 5). Defaulted at lower
|
|
671
678
|
* time to "on when continuity goals are on". */
|
|
@@ -818,6 +825,25 @@ export type IrObservability = {
|
|
|
818
825
|
readonly incidents?: IrObservabilityToggle;
|
|
819
826
|
readonly otel?: IrObservabilityOtel;
|
|
820
827
|
};
|
|
828
|
+
/**
|
|
829
|
+
* "Watch me" (design/watch-me.md §4.6) — observe-and-learn config, lowered
|
|
830
|
+
* from `spec.watchme` on the three interactive-loop shapes (IrV0/cli,
|
|
831
|
+
* IrChannelV0, IrManagedV0), carried beside `observability` (a sibling
|
|
832
|
+
* feature, not a telemetry sub-key). Unlike IrObservability's declare-only
|
|
833
|
+
* carriage, every field here is REQUIRED: the lowering resolves all defaults
|
|
834
|
+
* (a bare `watchme: {}` arrives fully populated), so emitters/runtimes never
|
|
835
|
+
* re-derive them. Absent from the IR entirely when the spec omits the block.
|
|
836
|
+
*/
|
|
837
|
+
export type IrWatchme = {
|
|
838
|
+
readonly enabled: boolean;
|
|
839
|
+
readonly capture: "full" | "mirrors";
|
|
840
|
+
/** Phase-2 judge model — default resolved at lower time. */
|
|
841
|
+
readonly judgeModel: string;
|
|
842
|
+
readonly judgeSampleRate: number;
|
|
843
|
+
readonly judgeBudgetUsd: number;
|
|
844
|
+
readonly scope: "harness" | "user";
|
|
845
|
+
readonly share: boolean;
|
|
846
|
+
};
|
|
821
847
|
/**
|
|
822
848
|
* Track F (Section 57) — typed message schemas (Σ) for multi-agent
|
|
823
849
|
* communication. Source: AgentFlow (arxiv 2604.20801). A typed graph
|
|
@@ -934,6 +960,10 @@ export type IrV0 = {
|
|
|
934
960
|
/** Ops item 37 — SLO targets + mitigation ladder. Optional; absent when the
|
|
935
961
|
* spec omits the `observability` block. */
|
|
936
962
|
readonly observability?: IrObservability;
|
|
963
|
+
/** "Watch me" — observe-and-learn config (design/watch-me.md §4.6).
|
|
964
|
+
* Optional; absent when the spec omits the `watchme` block; all defaults
|
|
965
|
+
* resolved at lower time when present. */
|
|
966
|
+
readonly watchme?: IrWatchme;
|
|
937
967
|
/** Item 1 (G30) — MCP-server projection config. Present when the spec
|
|
938
968
|
* declares `expose.mcp`; absent otherwise. */
|
|
939
969
|
readonly expose?: IrExpose;
|
|
@@ -1161,6 +1191,12 @@ export type IrWhatsAppConfig = {
|
|
|
1161
1191
|
readonly phoneNumberId: IrSecretRef;
|
|
1162
1192
|
readonly accessToken: IrSecretRef;
|
|
1163
1193
|
readonly appSecret: IrSecretRef;
|
|
1194
|
+
/**
|
|
1195
|
+
* Shared token echoed back on Meta's unsigned GET callback-URL verification
|
|
1196
|
+
* handshake (`hub.verify_token`). Optional — absent means the daemon fails
|
|
1197
|
+
* that handshake closed and serves only an already-verified subscription.
|
|
1198
|
+
*/
|
|
1199
|
+
readonly verifyToken?: IrSecretRef;
|
|
1164
1200
|
};
|
|
1165
1201
|
/**
|
|
1166
1202
|
* Section 33 — iMessage channel config (macOS host-bound). `chatDbPath`
|
|
@@ -1302,6 +1338,10 @@ export type IrChannelV0 = {
|
|
|
1302
1338
|
/** Ops item 37 — SLO targets + mitigation ladder. Optional; absent when the
|
|
1303
1339
|
* spec omits the `observability` block. */
|
|
1304
1340
|
readonly observability?: IrObservability;
|
|
1341
|
+
/** "Watch me" — observe-and-learn config (design/watch-me.md §4.6).
|
|
1342
|
+
* Optional; absent when the spec omits the `watchme` block; all defaults
|
|
1343
|
+
* resolved at lower time when present. */
|
|
1344
|
+
readonly watchme?: IrWatchme;
|
|
1305
1345
|
/** Item 1 (G30) — MCP-server projection config. Present when the spec
|
|
1306
1346
|
* declares `expose.mcp`; absent otherwise. */
|
|
1307
1347
|
readonly expose?: IrExpose;
|
|
@@ -1376,6 +1416,10 @@ export type IrManagedV0 = {
|
|
|
1376
1416
|
/** Loop contract 0.4 (Batch B, G02) — in-loop output evaluation.
|
|
1377
1417
|
* Optional; absent when the spec omits the `evaluation` block. */
|
|
1378
1418
|
readonly evaluation?: IrEvaluation;
|
|
1419
|
+
/** NEW-inloop-coverage — response-feedback config. Gates the gateway's
|
|
1420
|
+
* `feedback.submit` rating route and (with `autoDistill`) the daemon's
|
|
1421
|
+
* distill janitor step. Absent when the spec omits the block. */
|
|
1422
|
+
readonly feedback?: IrFeedback;
|
|
1379
1423
|
/** #53 cross-session memory config. Optional; absent when the spec omits `memory`. */
|
|
1380
1424
|
readonly memory?: IrMemory;
|
|
1381
1425
|
/** Loop contract 0.4 (Batch E, G22) — agent-shape RAG config. Present when
|
|
@@ -1395,6 +1439,12 @@ export type IrManagedV0 = {
|
|
|
1395
1439
|
* spec omits the `observability` block. The managed daemon's `pause-intake`
|
|
1396
1440
|
* rung reuses its `budget_exceeded` 429 path. */
|
|
1397
1441
|
readonly observability?: IrObservability;
|
|
1442
|
+
/** "Watch me" — observe-and-learn config (design/watch-me.md §4.6).
|
|
1443
|
+
* Optional; absent when the spec omits the `watchme` block; all defaults
|
|
1444
|
+
* resolved at lower time when present. CARRIED but not runtime-wired on
|
|
1445
|
+
* this shape in v1 — `compile()` emits the accepted-but-unwired warning
|
|
1446
|
+
* (design/watch-me.md §6.3 names the target-managed stamp seam). */
|
|
1447
|
+
readonly watchme?: IrWatchme;
|
|
1398
1448
|
/** Item 1 (G30) — MCP-server projection config. Present when the spec
|
|
1399
1449
|
* declares `expose.mcp`; absent otherwise. SSE-backed exposure rides this
|
|
1400
1450
|
* shape's gateway-server tenancy/budgets. */
|
|
@@ -1418,8 +1468,12 @@ export type IrGraphNode = {
|
|
|
1418
1468
|
readonly tools: readonly string[];
|
|
1419
1469
|
readonly toolConfigs: IrToolConfigs;
|
|
1420
1470
|
/**
|
|
1421
|
-
* When set, the node calls `ctx.requestApproval(prompt)`
|
|
1422
|
-
*
|
|
1471
|
+
* When set, the node calls `ctx.requestApproval(prompt)` BEFORE its LLM
|
|
1472
|
+
* turn and pauses the graph until `resume(checkpointId, decision)`. The
|
|
1473
|
+
* gate is a pre-condition: at the pause the node has spent nothing, the
|
|
1474
|
+
* `hitl_pause` event carries the upstream state the approver is deciding
|
|
1475
|
+
* on, and a rejecting decision cancels the turn (the node records only
|
|
1476
|
+
* `state["<name>_decision"]`).
|
|
1423
1477
|
*/
|
|
1424
1478
|
readonly hitlPrompt?: string;
|
|
1425
1479
|
/** Loop contract 0.4 (Batch B, G02) — `"judge"` marks a gate node over
|
|
@@ -1581,6 +1635,18 @@ export type IrCrewRole = {
|
|
|
1581
1635
|
* PolicyRouter decides per role against the shared routing-store
|
|
1582
1636
|
* scoreboard). Absent → single-model. */
|
|
1583
1637
|
readonly modelPool?: IrModelPool;
|
|
1638
|
+
/** 0.5.0 — this role's RESOLVED Thredz config: the crew-wide defaults with
|
|
1639
|
+
* the role's own `thredz.roles.<name>` overrides merged in, shorthands
|
|
1640
|
+
* expanded and the credential lowered. Absent → this role has no hosted
|
|
1641
|
+
* wiki. Resolution happens at lower time precisely so the emitter does no
|
|
1642
|
+
* inheritance logic. */
|
|
1643
|
+
readonly thredz?: IrThredz;
|
|
1644
|
+
/** 0.5.0 — the `mcp_servers` key of the server this role's Thredz rides:
|
|
1645
|
+
* `"thredz"` for the crew default, `"thredz-<slug>"` for a role override.
|
|
1646
|
+
* Carried explicitly so the emitter never re-derives it — a name derived
|
|
1647
|
+
* twice is a name that can drift, and `McpHost.getClient` on a name the
|
|
1648
|
+
* host does not carry degrades the role to local files SILENTLY. */
|
|
1649
|
+
readonly thredzServer?: string;
|
|
1584
1650
|
};
|
|
1585
1651
|
export type IrCrewRoutingKind = "match" | "llm";
|
|
1586
1652
|
export type IrCrewRouting = {
|
|
@@ -1838,6 +1904,14 @@ export type IrBrowserV0 = {
|
|
|
1838
1904
|
};
|
|
1839
1905
|
/** Optional initial URL; daemon calls driver.goto() before runChatLoop. */
|
|
1840
1906
|
readonly startUrl?: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* SECURITY — the spec opted in to private/loopback navigation targets
|
|
1909
|
+
* (`driver.allowPrivateTargets: true`). Relaxes BOTH the Navigate
|
|
1910
|
+
* pre-goto guard and the chromium DNS-pinning proxy for this harness,
|
|
1911
|
+
* never the http/https scheme allowlist. Carried only when true, so a
|
|
1912
|
+
* bundle that leaves it at the default stays byte-identical.
|
|
1913
|
+
*/
|
|
1914
|
+
readonly allowPrivateTargets?: boolean;
|
|
1841
1915
|
};
|
|
1842
1916
|
/** Vision-grounding model. Defaults at lower-time to agent.model. */
|
|
1843
1917
|
readonly groundingModel: string;
|
package/dist/readme.js
CHANGED
|
@@ -16,6 +16,7 @@ export const GENERATED_README_MARKER = "<!-- crewhaus:generated-readme -->";
|
|
|
16
16
|
*/
|
|
17
17
|
const SYNTHESIZED_LITERAL_KEYS = new Set([
|
|
18
18
|
"THREDZ_DEFAULT_VISIBILITY",
|
|
19
|
+
"THREDZ_DEFAULT_SPACE",
|
|
19
20
|
"THREDZ_API_BASE",
|
|
20
21
|
]);
|
|
21
22
|
export function collectSecretRefs(ir) {
|
|
@@ -342,7 +343,12 @@ function renderEnvSection(ir) {
|
|
|
342
343
|
function defaultUsageSection(ir) {
|
|
343
344
|
return {
|
|
344
345
|
heading: "Run",
|
|
345
|
-
body: [
|
|
346
|
+
body: [
|
|
347
|
+
"```sh",
|
|
348
|
+
"bun install # first run only — installs the bundle's dependencies",
|
|
349
|
+
RUN_COMMANDS[ir.target],
|
|
350
|
+
"```",
|
|
351
|
+
].join("\n"),
|
|
346
352
|
};
|
|
347
353
|
}
|
|
348
354
|
const WORKSPACE_NOTE = [
|