deepclause-sdk 0.4.0 → 0.6.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/README.md +134 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +154 -28
- package/dist/agent.js.map +1 -1
- package/dist/cli/config.d.ts +150 -140
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +3 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/login.d.ts +2 -1
- package/dist/cli/login.d.ts.map +1 -1
- package/dist/cli/login.js +15 -2
- package/dist/cli/login.js.map +1 -1
- package/dist/cli/repl.d.ts +54 -1
- package/dist/cli/repl.d.ts.map +1 -1
- package/dist/cli/repl.js +437 -54
- package/dist/cli/repl.js.map +1 -1
- package/dist/cli/set-backend.d.ts +2 -2
- package/dist/cli/set-backend.d.ts.map +1 -1
- package/dist/cli/set-backend.js +54 -8
- package/dist/cli/set-backend.js.map +1 -1
- package/dist/cli/work.d.ts +16 -0
- package/dist/cli/work.d.ts.map +1 -0
- package/dist/cli/work.js +45 -0
- package/dist/cli/work.js.map +1 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/prolog-src/deepclause_mi.pl +2426 -253
- package/dist/prolog-src/deepclause_strings.pl +36 -3
- package/dist/repl/agent.d.ts +5 -0
- package/dist/repl/agent.d.ts.map +1 -1
- package/dist/repl/agent.js +19 -7
- package/dist/repl/agent.js.map +1 -1
- package/dist/repl/auth.d.ts +6 -3
- package/dist/repl/auth.d.ts.map +1 -1
- package/dist/repl/auth.js +55 -5
- package/dist/repl/auth.js.map +1 -1
- package/dist/repl/backend.d.ts +24 -0
- package/dist/repl/backend.d.ts.map +1 -1
- package/dist/repl/backend.js +292 -12
- package/dist/repl/backend.js.map +1 -1
- package/dist/repl/compaction.d.ts +2 -0
- package/dist/repl/compaction.d.ts.map +1 -1
- package/dist/repl/compaction.js +9 -0
- package/dist/repl/compaction.js.map +1 -1
- package/dist/repl/event-history.d.ts +4 -0
- package/dist/repl/event-history.d.ts.map +1 -0
- package/dist/repl/event-history.js +33 -0
- package/dist/repl/event-history.js.map +1 -0
- package/dist/repl/harness-tools.d.ts +25 -18
- package/dist/repl/harness-tools.d.ts.map +1 -1
- package/dist/repl/harness-tools.js +103 -34
- package/dist/repl/harness-tools.js.map +1 -1
- package/dist/repl/history.d.ts +52 -2
- package/dist/repl/history.d.ts.map +1 -1
- package/dist/repl/history.js +113 -4
- package/dist/repl/history.js.map +1 -1
- package/dist/repl/index.d.ts +27 -5
- package/dist/repl/index.d.ts.map +1 -1
- package/dist/repl/index.js +27 -0
- package/dist/repl/index.js.map +1 -1
- package/dist/repl/reference.d.ts +31 -0
- package/dist/repl/reference.d.ts.map +1 -0
- package/dist/repl/reference.js +143 -0
- package/dist/repl/reference.js.map +1 -0
- package/dist/repl/render.d.ts +3 -1
- package/dist/repl/render.d.ts.map +1 -1
- package/dist/repl/render.js +7 -0
- package/dist/repl/render.js.map +1 -1
- package/dist/repl/session.d.ts +128 -23
- package/dist/repl/session.d.ts.map +1 -1
- package/dist/repl/session.js +895 -196
- package/dist/repl/session.js.map +1 -1
- package/dist/repl/tui/autocomplete.d.ts.map +1 -1
- package/dist/repl/tui/autocomplete.js +5 -1
- package/dist/repl/tui/autocomplete.js.map +1 -1
- package/dist/repl/tui/renderer.d.ts +2 -1
- package/dist/repl/tui/renderer.d.ts.map +1 -1
- package/dist/repl/tui/renderer.js +20 -3
- package/dist/repl/tui/renderer.js.map +1 -1
- package/dist/repl/tui/status-bar.d.ts +5 -2
- package/dist/repl/tui/status-bar.d.ts.map +1 -1
- package/dist/repl/tui/status-bar.js +8 -3
- package/dist/repl/tui/status-bar.js.map +1 -1
- package/dist/repl/tui/tool-pane.d.ts +1 -1
- package/dist/repl/tui/tool-pane.d.ts.map +1 -1
- package/dist/repl/tui/tool-pane.js +13 -7
- package/dist/repl/tui/tool-pane.js.map +1 -1
- package/dist/repl/tui/work-view.d.ts +10 -0
- package/dist/repl/tui/work-view.d.ts.map +1 -0
- package/dist/repl/tui/work-view.js +28 -0
- package/dist/repl/tui/work-view.js.map +1 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +50 -19
- package/dist/runner.js.map +1 -1
- package/dist/runtime-identity.json +10 -0
- package/dist/system/assets/docs/AGENT_PROMPT.md +265 -3008
- package/dist/system/assets/docs/DML_AUTHORING.md +81 -299
- package/dist/system/assets/docs/DML_BASICS.md +93 -0
- package/dist/system/assets/docs/DML_DEBUGGING.md +73 -0
- package/dist/system/assets/docs/DML_FORMS.md +94 -728
- package/dist/system/assets/docs/DML_MEDIA.md +63 -0
- package/dist/system/assets/docs/DML_PROCESSES.md +100 -0
- package/dist/system/assets/docs/DML_PYTHON.md +74 -0
- package/dist/system/assets/docs/DML_REFERENCE.md +224 -1971
- package/dist/system/assets/docs/DML_SHELL.md +107 -0
- package/dist/system/assets/docs/DML_TASKS.md +112 -0
- package/dist/system/assets/docs/HARNESS_EXAMPLES.md +255 -179
- package/dist/system/assets/docs/HARNESS_PATTERNS.md +65 -538
- package/dist/system/assets/docs/LOCAL_AGENT_PROMPT.md +186 -0
- package/dist/system/assets/docs/PROLOG_SNIPPETS.md +61 -154
- package/dist/system/assets/index.d.ts +1 -1
- package/dist/system/assets/index.d.ts.map +1 -1
- package/dist/system/assets/index.js +7 -0
- package/dist/system/assets/index.js.map +1 -1
- package/dist/system/environment.d.ts +1 -1
- package/dist/system/environment.d.ts.map +1 -1
- package/dist/system/environment.js +10 -6
- package/dist/system/environment.js.map +1 -1
- package/dist/system/runtime/shell-manager.d.ts +1 -1
- package/dist/system/runtime/shell-manager.d.ts.map +1 -1
- package/dist/types.d.ts +49 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/work/index.d.ts +82 -0
- package/dist/work/index.d.ts.map +1 -0
- package/dist/work/index.js +232 -0
- package/dist/work/index.js.map +1 -0
- package/package.json +12 -3
- package/src/prolog-src/deepclause_mi.pl +2426 -253
- package/src/prolog-src/deepclause_strings.pl +36 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Terminal adapter for the shared Work API. All execution/typing stays in SDK. */
|
|
2
|
+
import type { HarnessRepl } from '../repl/index.js';
|
|
3
|
+
import type { DMLEvent } from '../types.js';
|
|
4
|
+
export declare function parseWorkflowCommand(text: string): {
|
|
5
|
+
name: string;
|
|
6
|
+
inputs?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
export declare function runDeclaredWorkflow(options: {
|
|
9
|
+
repl: HarnessRepl;
|
|
10
|
+
name: string;
|
|
11
|
+
inputs?: Record<string, unknown>;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
ask?: (prompt: string, choices?: string[]) => Promise<string | undefined>;
|
|
14
|
+
render: (event: DMLEvent) => void;
|
|
15
|
+
}): Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../../src/cli/work.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAerG;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1E,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACnC,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBnB"}
|
package/dist/cli/work.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function parseWorkflowCommand(text) {
|
|
2
|
+
const quoted = /^("(?:[^"\\]|\\.)*")\s*/.exec(text.trim());
|
|
3
|
+
let name;
|
|
4
|
+
let rest;
|
|
5
|
+
if (quoted) {
|
|
6
|
+
name = JSON.parse(quoted[1]);
|
|
7
|
+
rest = text.trim().slice(quoted[0].length).trim();
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
const split = text.indexOf(' {');
|
|
11
|
+
name = (split < 0 ? text : text.slice(0, split)).trim();
|
|
12
|
+
rest = split < 0 ? '' : text.slice(split + 1).trim();
|
|
13
|
+
}
|
|
14
|
+
if (!name)
|
|
15
|
+
throw new Error('usage: /workflow "Workflow name" {"Input":"value"}');
|
|
16
|
+
if (!rest)
|
|
17
|
+
return { name };
|
|
18
|
+
const inputs = JSON.parse(rest);
|
|
19
|
+
if (!inputs || typeof inputs !== 'object' || Array.isArray(inputs))
|
|
20
|
+
throw new Error('inputs must be a JSON object');
|
|
21
|
+
return { name, inputs };
|
|
22
|
+
}
|
|
23
|
+
export async function runDeclaredWorkflow(options) {
|
|
24
|
+
const spec = await options.repl.workSpec();
|
|
25
|
+
const entry = spec.shell?.workflows.find(workflow => workflow.name === options.name);
|
|
26
|
+
if (!entry)
|
|
27
|
+
throw new Error(spec.shell ? `Unknown workflow '${options.name}'. Use /workflows.` : spec.diagnostics.join('\n'));
|
|
28
|
+
const inputs = options.inputs ?? {};
|
|
29
|
+
if (options.inputs === undefined) {
|
|
30
|
+
for (const field of entry.inputs) {
|
|
31
|
+
const value = await options.ask?.(`${field.name} (${field.type}${field.type === 'file' ? ', workspace-relative path' : ''})`, field.type === 'boolean' ? ['true', 'false'] : undefined);
|
|
32
|
+
if (value === undefined)
|
|
33
|
+
throw new Error('Workflow input cancelled or unavailable. Supply a JSON input object in noninteractive mode.');
|
|
34
|
+
Object.defineProperty(inputs, field.name, { value, enumerable: true });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
let ok = false;
|
|
38
|
+
for await (const event of options.repl.runWorkflow(options.name, inputs, { signal: options.signal })) {
|
|
39
|
+
options.render(event);
|
|
40
|
+
if (event.workflow)
|
|
41
|
+
ok = event.workflow.result.ok;
|
|
42
|
+
}
|
|
43
|
+
return ok;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=work.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.js","sourceRoot":"","sources":["../../src/cli/work.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,IAAI,IAAY,CAAC;IACjB,IAAI,IAAY,CAAC;IACjB,IAAI,MAAM,EAAE,CAAC;QAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAAC,CAAC;SAC3F,CAAC;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACxD,IAAI,GAAG,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G,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YACxL,IAAI,KAAK,KAAK,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAC;YACxI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,IAAI,EAAE,GAAG,KAAK,CAAC;IACf,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;QACrG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,KAAK,CAAC,QAAQ;YAAE,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
* with LLM-powered task execution.
|
|
6
6
|
*/
|
|
7
7
|
export { createDeepClause } from './sdk.js';
|
|
8
|
+
export * from './work/index.js';
|
|
8
9
|
export { setPrologHost, getPrologHost, recordPrologMessage } from './prolog/loader.js';
|
|
9
10
|
export * from './forms/index.js';
|
|
10
11
|
export type { PrologHost } from './prolog/loader.js';
|
|
11
|
-
export type { CompactionAction, CompactionScope, CompactionTrigger, CreateOptions, DeepClauseSDK, LLMBackend, LLMBackendMessage, LLMBackendRequest, LLMBackendResponse, LLMBackendTool, LLMBackendToolCall, LLMUsage, MemoryMessage, RunOptions, DMLEvent, TraceEntry, ToolDefinition, ToolPolicy, FormEventPayload, FormSubmitPayload, } from './types.js';
|
|
12
|
+
export type { CompactionAction, CompactionScope, CompactionTrigger, CreateOptions, DeepClauseSDK, LLMBackend, LLMBackendMessage, LLMBackendRequest, LLMBackendResponse, LLMBackendTool, LLMBackendToolCall, LLMUsage, MemoryMessage, HumanInputHandler, RunOptions, DMLEvent, TraceEntry, ToolDefinition, ToolPolicy, FormEventPayload, FormSubmitPayload, ShellSpec, ShellTool, ShellWorkflow, ShellWorkflowArg, } from './types.js';
|
|
12
13
|
export { createHarnessRepl } from './repl/index.js';
|
|
13
14
|
export { DMLSession } from './repl/session.js';
|
|
14
15
|
export type { HarnessRepl, HarnessReplOptions, RunOpts, DMLQueryEvent, ReplEvent, RollbackResult } from './repl/index.js';
|
|
15
|
-
export type { DMLSessionOptions, DMLQueryOptions, ProcessSession } from './repl/session.js';
|
|
16
|
+
export type { DMLSessionOptions, DMLQueryOptions, ProcessSession, HarnessModuleSource, HarnessModuleInfo } from './repl/session.js';
|
|
16
17
|
export { formatListing, highlightProlog, reflowListing } from './repl/highlight.js';
|
|
17
18
|
export { HarnessAgent, buildAgentSystemPrompt, describeTools } from './repl/agent.js';
|
|
18
19
|
export type { HarnessAgentOptions, HarnessAgentRunOptions } from './repl/agent.js';
|
|
@@ -22,19 +23,20 @@ export type { ProjectContext } from './repl/project-context.js';
|
|
|
22
23
|
export type { HarnessToolController, HarnessExecuteResult, HarnessCommitResult, } from './repl/harness-tools.js';
|
|
23
24
|
export { ReplStatusTracker, formatStatusLine, formatTokens, formatUsageSegment, formatContextSegment, formatModelSegment, } from './repl/status.js';
|
|
24
25
|
export type { ReplStatusSnapshot, ReplStatusTrackerOptions, StatusModelInfo, StatusContextUsage, StatusCompactionInfo, } from './repl/status.js';
|
|
25
|
-
export { DEFAULT_COMPACTION_SETTINGS, SUMMARY_PREFIX, buildSummaryMessage, buildSummarizationPrompt, calculateContextTokens, compactMemory, estimateMemoryTokens, findCompactionCut, findExistingSummary, generateMemorySummary, serializeMemoryConversation, shouldCompact, toCompactionEvent, } from './repl/compaction.js';
|
|
26
|
+
export { DEFAULT_COMPACTION_SETTINGS, boundCompactionSettings, SUMMARY_PREFIX, buildSummaryMessage, buildSummarizationPrompt, calculateContextTokens, compactMemory, estimateMemoryTokens, findCompactionCut, findExistingSummary, generateMemorySummary, serializeMemoryConversation, shouldCompact, toCompactionEvent, } from './repl/compaction.js';
|
|
26
27
|
export type { CompactionSettings, CompactMemoryResult, CompactMemoryReason, MemoryCompactionEvent, } from './repl/compaction.js';
|
|
27
28
|
export type { HarnessExportOptions, HarnessExportResult } from './repl/export.js';
|
|
28
29
|
export { startProcessWorker } from './repl/process-worker.js';
|
|
29
30
|
export type { ProcessWorkerPort } from './repl/process-worker.js';
|
|
30
|
-
export { createPiBackend, createPiAdapter, resolvePiPaths, selectPiModel } from './repl/backend.js';
|
|
31
|
+
export { DEFAULT_LLAMA_SERVER_URL, LLAMA_PROVIDER_ID, createPiBackend, createPiAdapter, createLimitedBackend, resolveLlamaServerUrl, resolvePiPaths, selectPiModel, } from './repl/backend.js';
|
|
32
|
+
export type { LlamaServerOptions } from './repl/backend.js';
|
|
31
33
|
export { createReplToolset, buildToolCatalog } from './repl/toolset.js';
|
|
32
34
|
export { pickFromList, filterItems, renderPick } from './repl/picker.js';
|
|
33
35
|
export type { PickItem, PickOptions } from './repl/picker.js';
|
|
34
36
|
export { apiKeyInteraction, createTerminalAuthInteraction, listLoginProviders, loginToProvider, logoutProvider, } from './repl/auth.js';
|
|
35
37
|
export type { LoginProviderOption } from './repl/auth.js';
|
|
36
|
-
export { HistoryStore } from './repl/history.js';
|
|
37
|
-
export type { HistoryOptions, HistoryTrace, HistoryTurnRecord, HistoryChangeRecord, HistoryChangedPredicate, HistoryEventContext, } from './repl/history.js';
|
|
38
|
+
export { HistoryStore, moduleVersion, isValidHarnessName } from './repl/history.js';
|
|
39
|
+
export type { HistoryOptions, SessionMetadata, SessionSummary, SessionHarnessSnapshot, HistoryTrace, HistoryTurnRecord, HistoryChangeRecord, HistoryChangedPredicate, HistoryEventContext, } from './repl/history.js';
|
|
38
40
|
export { validateWithProlog } from './validate.js';
|
|
39
41
|
export type { ValidationResult } from './validate.js';
|
|
40
42
|
export { createMockJudgeBackend, createMockJevJudgeBackend, createJevJudgeBackend, createLLMJudgeBackend, buildJudgePrompt, parseJudgeResponse, } from './judge/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,MAAM,YAA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qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,MAAM,GACP,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,GAAG,EACH,MAAM,EACN,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* with LLM-powered task execution.
|
|
6
6
|
*/
|
|
7
7
|
export { createDeepClause } from './sdk.js';
|
|
8
|
+
export * from './work/index.js';
|
|
8
9
|
// Engine host seam: lets a non-Node embedding (the browser) supply the SWI-Prolog
|
|
9
10
|
// loader and workspace mount. See docs/DML_FORMS.md-adjacent embedding notes.
|
|
10
11
|
export { setPrologHost, getPrologHost, recordPrologMessage } from './prolog/loader.js';
|
|
@@ -20,14 +21,14 @@ export { createHarnessTools } from './repl/harness-tools.js';
|
|
|
20
21
|
export { loadProjectContext } from './repl/project-context.js';
|
|
21
22
|
// RepL status accounting (status bar) and TypeScript compaction (ported from pi)
|
|
22
23
|
export { ReplStatusTracker, formatStatusLine, formatTokens, formatUsageSegment, formatContextSegment, formatModelSegment, } from './repl/status.js';
|
|
23
|
-
export { DEFAULT_COMPACTION_SETTINGS, SUMMARY_PREFIX, buildSummaryMessage, buildSummarizationPrompt, calculateContextTokens, compactMemory, estimateMemoryTokens, findCompactionCut, findExistingSummary, generateMemorySummary, serializeMemoryConversation, shouldCompact, toCompactionEvent, } from './repl/compaction.js';
|
|
24
|
+
export { DEFAULT_COMPACTION_SETTINGS, boundCompactionSettings, SUMMARY_PREFIX, buildSummaryMessage, buildSummarizationPrompt, calculateContextTokens, compactMemory, estimateMemoryTokens, findCompactionCut, findExistingSummary, generateMemorySummary, serializeMemoryConversation, shouldCompact, toCompactionEvent, } from './repl/compaction.js';
|
|
24
25
|
// L2 process worker body, for hosts that run it outside `worker_threads`.
|
|
25
26
|
export { startProcessWorker } from './repl/process-worker.js';
|
|
26
|
-
export { createPiBackend, createPiAdapter, resolvePiPaths, selectPiModel } from './repl/backend.js';
|
|
27
|
+
export { DEFAULT_LLAMA_SERVER_URL, LLAMA_PROVIDER_ID, createPiBackend, createPiAdapter, createLimitedBackend, resolveLlamaServerUrl, resolvePiPaths, selectPiModel, } from './repl/backend.js';
|
|
27
28
|
export { createReplToolset, buildToolCatalog } from './repl/toolset.js';
|
|
28
29
|
export { pickFromList, filterItems, renderPick } from './repl/picker.js';
|
|
29
30
|
export { apiKeyInteraction, createTerminalAuthInteraction, listLoginProviders, loginToProvider, logoutProvider, } from './repl/auth.js';
|
|
30
|
-
export { HistoryStore } from './repl/history.js';
|
|
31
|
+
export { HistoryStore, moduleVersion, isValidHarnessName } from './repl/history.js';
|
|
31
32
|
// DML validation and linting — also available via 'deepclause-sdk/validate'
|
|
32
33
|
export { validateWithProlog } from './validate.js';
|
|
33
34
|
// Judgment layer: generic judge primitives with pluggable backends
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,kFAAkF;AAClF,8EAA8E;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