negotium 0.1.39 → 0.1.41
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/agent-helpers.js +67 -54
- package/dist/agent-helpers.js.map +10 -10
- package/dist/browser-runtime.js +43 -33
- package/dist/browser-runtime.js.map +5 -5
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +68 -55
- package/dist/main.js.map +9 -9
- package/dist/mcp-factories.js +66 -54
- package/dist/mcp-factories.js.map +9 -9
- package/dist/prompts.js +7 -4
- package/dist/prompts.js.map +3 -3
- package/dist/query-runtime.js +31 -23
- package/dist/query-runtime.js.map +4 -4
- package/dist/runtime/src/agents/mcp-tools/ask-user.ts +30 -15
- package/dist/runtime/src/agents/public-helpers.ts +1 -0
- package/dist/runtime/src/prompts/builders.ts +13 -1
- package/dist/runtime/src/runtime/background-sessions.ts +4 -2
- package/dist/runtime/src/storage/runtime-leases.ts +16 -15
- package/dist/runtime/src/storage/runtime-process-leases.ts +13 -12
- package/dist/runtime/src/storage/runtime-topic-state.ts +12 -9
- package/dist/runtime/src/storage/storage-public.ts +4 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/storage.js +419 -1
- package/dist/storage.js.map +7 -3
- package/dist/types/packages/core/src/agents/mcp-tools/ask-user.d.ts +14 -0
- package/dist/types/packages/core/src/agents/public-helpers.d.ts +1 -1
- package/dist/types/packages/core/src/prompts/builders.d.ts +8 -0
- package/dist/types/packages/core/src/storage/storage-public.d.ts +4 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -101,6 +101,20 @@ export declare function normalizeAskUserQuestionInput(input: {
|
|
|
101
101
|
* durability, and runtime services.
|
|
102
102
|
*/
|
|
103
103
|
export declare function createAskUserRuntime(host: AskUserRuntimeHost): AskUserRuntime;
|
|
104
|
+
/**
|
|
105
|
+
* Negotium's own SQLite-backed durability wiring for {@link AskUserRuntimeHost}.
|
|
106
|
+
* Embedding hosts (e.g. Otium) that want durable ask-gates and runtime-process
|
|
107
|
+
* leases without reimplementing that storage can reuse this directly:
|
|
108
|
+
* `createAskUserRuntime({ messaging, topics, durability: defaultAskUserDurabilityHost, runtime })`.
|
|
109
|
+
*
|
|
110
|
+
* Important: the gate claim step reads and writes the `ask_user_question`
|
|
111
|
+
* column on the real `api_messages` row directly (see `#storage/ask-user-gates`),
|
|
112
|
+
* not through `host.messaging.persistence`. A host that pairs this durability
|
|
113
|
+
* layer with its own message store must still persist the ask-card message via
|
|
114
|
+
* Negotium's `appendApiMessage`/`getApiMessage` (exported from `negotium/storage`)
|
|
115
|
+
* so the gate and the message agree on the same row.
|
|
116
|
+
*/
|
|
117
|
+
export declare const defaultAskUserDurabilityHost: AskUserRuntimeHost["durability"];
|
|
104
118
|
export declare function startAskUserQuestionGateOwner(): void;
|
|
105
119
|
export declare function stopAskUserQuestionGateOwner(): void;
|
|
106
120
|
export declare function reconcilePendingAskUserQuestionGates(): number;
|
|
@@ -3,7 +3,7 @@ export { type AgentAuthHost, type AuthCheckResult, checkAgentAuth, checkAgentMod
|
|
|
3
3
|
export { acquireCodexSpawnLock, type CodexProcStamp, type CodexTreeHost, type CodexTreeLogger, type CodexTreeManager, type CodexTreeManagerOptions, createCodexTreeManager, findNewCodexChildren, killCodexTrees, killOwnedCodexTreesForShutdown, registerOwnedCodexPids, snapshotCodexChildren, unregisterOwnedCodexPids, withCodexSpawnSerial, } from "./codex-tree-kill";
|
|
4
4
|
export { type AgentForkHelpers, type AgentForkHost, cleanupAgentFork, createAgentForkHelpers, type ForkAgentSessionOptions, type ForkHandle, forkAgentSession, } from "./fork";
|
|
5
5
|
export { type ActiveTopicArchiveOptions, archiveActiveTopicForMemory, } from "./idle-archiver";
|
|
6
|
-
export { type AnswerAskUserQuestionResult, type AskUserChoice, type AskUserRuntime, type AskUserRuntimeHost, type AskUserToolContext, createAskUserRuntime, normalizeAskUserChoices, normalizeAskUserQuestionInput, } from "./mcp-tools/ask-user";
|
|
6
|
+
export { type AnswerAskUserQuestionResult, type AskUserChoice, type AskUserRuntime, type AskUserRuntimeHost, type AskUserToolContext, createAskUserRuntime, defaultAskUserDurabilityHost, normalizeAskUserChoices, normalizeAskUserQuestionInput, } from "./mcp-tools/ask-user";
|
|
7
7
|
export { createSelfConfigRuntime, createSelfConfigToolDefinitionsForCore, type SelfConfigRuntime, type SelfConfigRuntimeOptions, } from "./mcp-tools/self-config";
|
|
8
8
|
export { createSubagentLifecycle, type SpawnSubagentToolContext, type SubagentLifecycle, type SubagentLifecycleHost, type SubagentLifecycleLimits, type SubagentToolContext, type SubagentWatch, } from "./mcp-tools/spawn-subagent";
|
|
9
9
|
export { otiumVisualToolDefinitions, showPngTool, } from "./mcp-tools/visual-compat";
|
|
@@ -50,6 +50,14 @@ export interface PromptTemplateRequest {
|
|
|
50
50
|
export interface PromptBuilderHost {
|
|
51
51
|
readonly loadTemplate?: (request: PromptTemplateRequest) => string | null | undefined;
|
|
52
52
|
readonly extraSections?: readonly PromptExtraSection[];
|
|
53
|
+
/**
|
|
54
|
+
* Whether the runtime exposes `schedule_self`/`get_self_schedule`/
|
|
55
|
+
* `update_self_schedule`/`cancel_self_schedule` tools. Defaults to `true`
|
|
56
|
+
* (Negotium's own runtime-server exposes them). Hosts without a matching
|
|
57
|
+
* delayed-continuation worker should set this to `false` so the generated
|
|
58
|
+
* prompt does not advertise a tool call that will fail with tool-not-found.
|
|
59
|
+
*/
|
|
60
|
+
readonly scheduleSelf?: boolean;
|
|
53
61
|
}
|
|
54
62
|
export interface PromptBuilders {
|
|
55
63
|
buildTopicSystemPrompt(opts: SessionSystemPromptOpts): string;
|
|
@@ -11,11 +11,15 @@ export * as apiTopics from "./api-topics";
|
|
|
11
11
|
export * from "./api-topics";
|
|
12
12
|
export * as appSettings from "./app-settings";
|
|
13
13
|
export * from "./app-settings";
|
|
14
|
+
export * as askUserGates from "./ask-user-gates";
|
|
15
|
+
export * from "./ask-user-gates";
|
|
14
16
|
export * as conversations from "./conversations";
|
|
15
17
|
export * from "./conversations";
|
|
16
18
|
export type { ForumTopicInfo, TopicRow, UserForumConfig, UserRow, } from "./forum/index";
|
|
17
19
|
export * as forum from "./forum/index";
|
|
18
20
|
export { addTopic, clearDmSessionId, clearSessionForTopic, findUserByThread, flushSessionCache, getAllTopics, getAllUserIds, getCommunicateThreadId, getDmSessionId, getLastShownConfig, getSessionForTopic, getTopicAgent, getTopicByName as getForumTopicByName, getTopicDescription, getTopicMcpConfig, getTopicNames, getUserConfig, removeTopic, renameTopic, setDmSessionId, setLastShownConfig, setSessionForTopic, setTopicAgent, setTopicDescription, setTopicForkOrigin, setTopicMcpEnabled, setTopicMcpExtra, updateTopicThreadId, } from "./forum/index";
|
|
21
|
+
export * as runtimeProcessLeases from "./runtime-process-leases";
|
|
22
|
+
export * from "./runtime-process-leases";
|
|
19
23
|
export * as sessionAsks from "./session-asks";
|
|
20
24
|
export * from "./session-asks";
|
|
21
25
|
export type { StorageDatabase, StorageDatabaseAdapter, StorageDatabaseInput, StorageHostConfig, StorageHostOptions, StorageStatement, StorageTransaction, } from "./storage-contract";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const NEGOTIUM_VERSION = "0.1.
|
|
1
|
+
export declare const NEGOTIUM_VERSION = "0.1.41";
|