@intentic/sandbox-contract 1.329.0 → 1.331.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/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js +1 -2
- package/dist/chores/probes.js.map +1 -1
- package/dist/contracts/accounts.contract.d.ts +4 -0
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +69 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +6 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +2 -1
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +3 -0
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runs.contract.d.ts +35 -0
- package/dist/contracts/runs.contract.d.ts.map +1 -0
- package/dist/contracts/runs.contract.js +22 -0
- package/dist/contracts/runs.contract.js.map +1 -0
- package/dist/contracts/settings.contract.d.ts +10 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +45 -30
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +10 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts +4 -0
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +37 -0
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +11 -1
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +1 -0
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/system-events.d.ts +10 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/index.d.ts +179 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/models/model-roles.d.ts +8 -0
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +8 -0
- package/dist/models/model-roles.js.map +1 -1
- package/dist/models/plan-pools.d.ts +2 -0
- package/dist/models/plan-pools.d.ts.map +1 -1
- package/dist/models/plan-pools.js +23 -7
- package/dist/models/plan-pools.js.map +1 -1
- package/dist/protocol/doors/listener-protocol.d.ts +0 -1
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +3 -2
- package/dist/protocol/doors/listener-protocol.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +25 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +7 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/schemas/agent.d.ts +3 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agents-list.d.ts +4 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +13 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +4 -3
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/device-artifacts.d.ts +13 -0
- package/dist/schemas/device-artifacts.d.ts.map +1 -1
- package/dist/schemas/device-artifacts.js +13 -0
- package/dist/schemas/device-artifacts.js.map +1 -1
- package/dist/schemas/environment.d.ts +30 -0
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js +13 -0
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/providers/plan-limits.d.ts +7 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +5 -1
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/provider-oauth.d.ts +4 -0
- package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/run-targets.d.ts +82 -0
- package/dist/schemas/run-targets.d.ts.map +1 -0
- package/dist/schemas/run-targets.js +49 -0
- package/dist/schemas/run-targets.js.map +1 -0
- package/dist/schemas/settings-history.d.ts +6 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +4 -1
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings.d.ts +10 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +2 -1
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/speech.d.ts +75 -0
- package/dist/schemas/speech.d.ts.map +1 -0
- package/dist/schemas/speech.js +66 -0
- package/dist/schemas/speech.js.map +1 -0
- package/dist/schemas/terminal.d.ts +4 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +4 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/turn-break.d.ts +7 -1
- package/dist/schemas/turn-break.d.ts.map +1 -1
- package/dist/schemas/turn-break.js +4 -2
- package/dist/schemas/turn-break.js.map +1 -1
- package/dist/schemas/workspace/workspace-graph.d.ts +133 -0
- package/dist/schemas/workspace/workspace-graph.d.ts.map +1 -0
- package/dist/schemas/workspace/workspace-graph.js +83 -0
- package/dist/schemas/workspace/workspace-graph.js.map +1 -0
- package/dist/schemas/workspace/workspace-repos.d.ts +0 -39
- package/dist/schemas/workspace/workspace-repos.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-repos.js +0 -15
- package/dist/schemas/workspace/workspace-repos.js.map +1 -1
- package/dist/state/definition.d.ts +8 -4
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/workspace-state.d.ts +2 -1
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +5 -1
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/text/transcript-page.d.ts +5 -0
- package/dist/text/transcript-page.d.ts.map +1 -0
- package/dist/text/transcript-page.js +17 -0
- package/dist/text/transcript-page.js.map +1 -0
- package/package.json +5 -5
- package/src/chores/probes.ts +1 -2
- package/src/contracts/device.contract.ts +6 -1
- package/src/contracts/runs.contract.ts +26 -0
- package/src/contracts/system.contract.ts +13 -0
- package/src/contracts/workspace.contract.ts +12 -1
- package/src/index.ts +7 -1
- package/src/models/agent-runtimes.ts +2 -2
- package/src/models/model-roles.ts +8 -0
- package/src/models/plan-pools.test.ts +27 -0
- package/src/models/plan-pools.ts +38 -10
- package/src/protocol/doors/listener-protocol.ts +5 -4
- package/src/protocol/raw/raw-routes.ts +12 -0
- package/src/schemas/agents.ts +6 -3
- package/src/schemas/device-artifacts.ts +21 -0
- package/src/schemas/environment.ts +25 -0
- package/src/schemas/providers/plan-limits.ts +9 -1
- package/src/schemas/run-targets.ts +93 -0
- package/src/schemas/settings-history.ts +15 -1
- package/src/schemas/settings.test.ts +25 -0
- package/src/schemas/settings.ts +6 -1
- package/src/schemas/speech.ts +96 -0
- package/src/schemas/terminal.ts +4 -0
- package/src/schemas/turn-break.ts +18 -9
- package/src/schemas/workspace/workspace-graph.ts +116 -0
- package/src/schemas/workspace/workspace-repos.ts +0 -22
- package/src/state/workspace-state.test.ts +42 -1
- package/src/state/workspace-state.ts +12 -1
- package/src/text/transcript-page.test.ts +39 -0
- package/src/text/transcript-page.ts +37 -0
- package/dist/text/whisper.d.ts +0 -3
- package/dist/text/whisper.d.ts.map +0 -1
- package/dist/text/whisper.js +0 -11
- package/dist/text/whisper.js.map +0 -1
- package/src/text/whisper.test.ts +0 -18
- package/src/text/whisper.ts +0 -17
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ToolCallContent } from "../events/requests.js";
|
|
2
|
+
import type { TranscriptRow, TranscriptTool } from "../events/transcript.js";
|
|
3
|
+
|
|
4
|
+
// WHAT A TRANSCRIPT PAGE CARRIES OF A ROW, written once for both ends: the daemon fits every row of a page it serves to
|
|
5
|
+
// this (sessions/agent-transcript.ts), and the editor fits the rows it mirrors to disk the same way, so a reopened chat
|
|
6
|
+
// paints from its mirror exactly the rows the daemon's page then hands back, and keeps them rather than drawing them
|
|
7
|
+
// again (transcriptState.ts rebuildKeeping matches rows by their contents).
|
|
8
|
+
|
|
9
|
+
// What a page carries of one tool output: the pane truncates text at 4000 characters of its own accord
|
|
10
|
+
// (toolPresentation.ts TEXT_CAP), so twice that leaves room to raise that cap without a second round trip.
|
|
11
|
+
export const PAGE_TEXT_CAP = 8_000;
|
|
12
|
+
|
|
13
|
+
const fitContent = (entry: ToolCallContent): ToolCallContent =>
|
|
14
|
+
entry.type === "text" && entry.text.length > PAGE_TEXT_CAP ? { ...entry, text: entry.text.slice(0, PAGE_TEXT_CAP) } : entry;
|
|
15
|
+
|
|
16
|
+
// A delegation's own calls are left behind, counted rather than carried: the card draws collapsed until it is opened,
|
|
17
|
+
// and the daemon answers that press with the calls themselves. On the records this was measured on they were 86% of the
|
|
18
|
+
// bytes of the longest conversation.
|
|
19
|
+
const fitPageTool = (tool: TranscriptTool): TranscriptTool => {
|
|
20
|
+
const { children, content, ...carried } = tool;
|
|
21
|
+
return {
|
|
22
|
+
...carried,
|
|
23
|
+
...(content !== undefined ? { content: content.map(fitContent) } : {}),
|
|
24
|
+
...(children !== undefined && children.length > 0 ? { nested: children.length } : {}),
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** A row as a page carries it; a row with no calls is handed back as it is. */
|
|
29
|
+
export const fitPageRow = <Row extends TranscriptRow>(row: Row): Row =>
|
|
30
|
+
row.tools === undefined ? row : { ...row, tools: row.tools.map(fitPageTool) };
|
|
31
|
+
|
|
32
|
+
/** A call with everything under it, each output at every depth fitted the same way: what an opened delegation draws. */
|
|
33
|
+
export const fitNestedTool = (tool: TranscriptTool): TranscriptTool => ({
|
|
34
|
+
...tool,
|
|
35
|
+
...(tool.content !== undefined ? { content: tool.content.map(fitContent) } : {}),
|
|
36
|
+
...(tool.children !== undefined ? { children: tool.children.map(fitNestedTool) } : {}),
|
|
37
|
+
});
|
package/dist/text/whisper.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whisper.d.ts","sourceRoot":"","sources":["../../src/text/whisper.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAI1D,eAAO,MAAM,kBAAkB,WAAY,MAAM,KAAG,MAAM,GAAG,SAQ5D,CAAC"}
|
package/dist/text/whisper.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const WHISPER_MODEL_REPO = "ggerganov/whisper.cpp";
|
|
2
|
-
export const cleanTranscription = (stdout) => {
|
|
3
|
-
const text = stdout
|
|
4
|
-
.split("\n")
|
|
5
|
-
.map((line) => line.trim())
|
|
6
|
-
.filter((line) => line !== "" && !/^[[(].*[\])]$/.test(line))
|
|
7
|
-
.join(" ")
|
|
8
|
-
.trim();
|
|
9
|
-
return text === "" ? undefined : text;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=whisper.js.map
|
package/dist/text/whisper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whisper.js","sourceRoot":"","sources":["../../src/text/whisper.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAI1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAsB,EAAE;IACrE,MAAM,IAAI,GAAG,MAAM;SACd,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC5D,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE,CAAC;IACZ,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC,CAAC"}
|
package/src/text/whisper.test.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { cleanTranscription } from "./whisper.js";
|
|
2
|
-
|
|
3
|
-
test("flattens whisper output onto one line", () => {
|
|
4
|
-
expect(cleanTranscription(" Hello there.\n General Kenobi.\n")).toBe("Hello there. General Kenobi.");
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
// The whole reason this filter exists: whisper narrates silence, and a narration dispatched as speech is a
|
|
8
|
-
// turn nobody asked for.
|
|
9
|
-
test("drops noise-only annotations, in both bracket styles", () => {
|
|
10
|
-
expect(cleanTranscription(" [BLANK_AUDIO]\n")).toBeUndefined();
|
|
11
|
-
expect(cleanTranscription("(wind blowing)")).toBeUndefined();
|
|
12
|
-
expect(cleanTranscription("")).toBeUndefined();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// An annotation next to real speech drops the annotation and keeps the speech: the utterance did happen.
|
|
16
|
-
test("keeps speech that arrived alongside an annotation", () => {
|
|
17
|
-
expect(cleanTranscription("[music] \nreal words")).toBe("real words");
|
|
18
|
-
});
|
package/src/text/whisper.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Shared reading of whisper.cpp's stdout, used by the daemon's speech route and Discord's voice session, so both filter
|
|
2
|
-
// non-speech annotations the same way.
|
|
3
|
-
|
|
4
|
-
// Hugging Face repo the ggml-*.bin weights pull from on first use; each integration downloads its own size.
|
|
5
|
-
export const WHISPER_MODEL_REPO = "ggerganov/whisper.cpp";
|
|
6
|
-
|
|
7
|
-
// Cleans whisper's stdout to one line of text, or undefined for silence/noise-only output — a line that is entirely a
|
|
8
|
-
// bracketed annotation like `[BLANK_AUDIO]`.
|
|
9
|
-
export const cleanTranscription = (stdout: string): string | undefined => {
|
|
10
|
-
const text = stdout
|
|
11
|
-
.split("\n")
|
|
12
|
-
.map((line) => line.trim())
|
|
13
|
-
.filter((line) => line !== "" && !/^[[(].*[\])]$/.test(line))
|
|
14
|
-
.join(" ")
|
|
15
|
-
.trim();
|
|
16
|
-
return text === "" ? undefined : text;
|
|
17
|
-
};
|