@kodax-ai/kodax 0.7.97-beta.2 → 0.7.97-beta.3
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/CHANGELOG.md +96 -0
- package/README.md +55 -2
- package/README_CN.md +37 -1
- package/dist/artifacts/dist/contract.js +1 -1
- package/dist/artifacts/dist/contract.js.map +1 -1
- package/dist/artifacts/dist/document-render.d.ts +1 -1
- package/dist/artifacts/dist/document-render.js +41 -10
- package/dist/artifacts/dist/document-render.js.map +1 -1
- package/dist/artifacts/dist/kodax.js +1 -1
- package/dist/artifacts/dist/kodax.js.map +1 -1
- package/dist/artifacts/dist/libreoffice.d.ts +6 -1
- package/dist/artifacts/dist/libreoffice.js +37 -13
- package/dist/artifacts/dist/libreoffice.js.map +1 -1
- package/dist/artifacts/dist/runtime.js +13 -6
- package/dist/artifacts/dist/runtime.js.map +1 -1
- package/dist/artifacts/skills/artifact-review/SKILL.md +5 -1
- package/dist/chunks/agent-NWQPMZ7B.js +2 -0
- package/dist/chunks/agent-adapter-V3IPADCX.js +2 -0
- package/dist/chunks/argument-completer-VNKHT4X4.js +2 -0
- package/dist/chunks/{bedrock-native-Z5VNWF5U.js → bedrock-native-OEPOBW6W.js} +1 -1
- package/dist/chunks/{chunk-NSR4RW2F.js → chunk-3I2MIS4D.js} +1 -1
- package/dist/chunks/{chunk-RYBUYHDL.js → chunk-3Y5PBEOD.js} +1 -1
- package/dist/chunks/chunk-4FVCMKG2.js +20 -0
- package/dist/chunks/{chunk-F6GJXQNA.js → chunk-4GYXZTOD.js} +7 -7
- package/dist/chunks/{chunk-EISRVOBJ.js → chunk-4Z7ZHL6V.js} +2 -2
- package/dist/chunks/{chunk-W2CWO4PQ.js → chunk-576AAIQM.js} +1 -1
- package/dist/chunks/chunk-5E2P4RYS.js +4 -0
- package/dist/chunks/{chunk-X5M7TLJV.js → chunk-5LFQ5FVY.js} +1 -1
- package/dist/chunks/{chunk-WMMESRP3.js → chunk-6RDMSU4B.js} +1 -1
- package/dist/chunks/{chunk-3CP7AUWY.js → chunk-7BA4TSKC.js} +1 -1
- package/dist/chunks/{chunk-I325ER7D.js → chunk-AUU3N4V4.js} +1 -1
- package/dist/chunks/{chunk-DCE7XQUG.js → chunk-AYDLX2UK.js} +1 -1
- package/dist/chunks/{chunk-D36OIMV7.js → chunk-BP3NAYKY.js} +64 -64
- package/dist/chunks/{chunk-6TITQQAI.js → chunk-BSCSKJNC.js} +230 -229
- package/dist/chunks/{chunk-2HH5AS7E.js → chunk-DAQGOWKD.js} +88 -462
- package/dist/chunks/{chunk-UF3GZ5PO.js → chunk-EZF6ZRCO.js} +1 -1
- package/dist/chunks/chunk-F2TFWNVZ.js +2 -0
- package/dist/chunks/{chunk-53CJDQS2.js → chunk-FVXZ5L33.js} +1 -1
- package/dist/chunks/{chunk-MCDZNQWD.js → chunk-G32BMSHH.js} +75 -71
- package/dist/chunks/chunk-HJLYZ5AX.js +361 -0
- package/dist/chunks/{chunk-P55RJIOG.js → chunk-IOIFCU46.js} +1 -1
- package/dist/chunks/{chunk-DV5YPYLW.js → chunk-IR46ZHXU.js} +1 -1
- package/dist/chunks/chunk-NJDR5EEF.js +6 -0
- package/dist/chunks/{chunk-KDSO7V4O.js → chunk-OC3DQXN6.js} +1 -1
- package/dist/chunks/{chunk-J2L2NK6E.js → chunk-OMVAPRQI.js} +90 -57
- package/dist/chunks/chunk-OXCB2TRF.js +42 -0
- package/dist/chunks/{chunk-C6JGLEYD.js → chunk-P6R6V7EW.js} +1 -1
- package/dist/chunks/{chunk-SK3RRGHJ.js → chunk-PFBZ4ZXO.js} +28 -28
- package/dist/chunks/{chunk-V2XJSFFE.js → chunk-QDE6THC5.js} +1 -1
- package/dist/chunks/{chunk-EPK6EWRI.js → chunk-QRYEP34M.js} +1 -1
- package/dist/chunks/chunk-ROWYE472.js +460 -0
- package/dist/chunks/{chunk-R42S4BLA.js → chunk-SQGESMNC.js} +1 -1
- package/dist/chunks/{chunk-XZSFUGPN.js → chunk-U73VEVMP.js} +1 -1
- package/dist/chunks/{chunk-D425EZGC.js → chunk-V2TG7GNW.js} +1 -1
- package/dist/chunks/{chunk-QSZCR5GC.js → chunk-VRO2CDBY.js} +97 -97
- package/dist/chunks/{chunk-BBZWF2EA.js → chunk-WMQQQY3D.js} +1 -1
- package/dist/chunks/{chunk-JAF2YLZO.js → chunk-X3YYJJTF.js} +2 -2
- package/dist/chunks/{chunk-UL6YIT4M.js → chunk-XYRI6ER5.js} +1 -1
- package/dist/chunks/chunk-YRPB3LID.js +3 -0
- package/dist/chunks/{chunk-5MUVRFMU.js → chunk-ZDAU3LZ2.js} +1 -1
- package/dist/chunks/{chunk-WWPVEK6B.js → chunk-ZP3YSYWM.js} +10 -10
- package/dist/chunks/{client-LTIFNED5.js → client-NJ32JBC3.js} +1 -1
- package/dist/chunks/compaction-config-JBQGU3NO.js +2 -0
- package/dist/chunks/{construction-bootstrap-OAZKGI5Y.js → construction-bootstrap-CM47ZXG7.js} +1 -1
- package/dist/chunks/dist-O6BHIQEP.js +2 -0
- package/dist/chunks/{google-native-WLL27OV7.js → google-native-BV5GKT5B.js} +1 -1
- package/dist/chunks/host-PI5NL4W4.js +2 -0
- package/dist/chunks/{mistral-native-JXPIDDYZ.js → mistral-native-X42JCFZH.js} +1 -1
- package/dist/chunks/{model-DZF6URW3.js → model-MT3WJX76.js} +1 -1
- package/dist/chunks/{permission-YVVMLQ5I.js → permission-YVDVSE6H.js} +1 -1
- package/dist/chunks/{pi-messages-5LLOZH57.js → pi-messages-DVJANXV5.js} +1 -1
- package/dist/chunks/readline-helpers-5JS7UGTE.js +2 -0
- package/dist/chunks/run-manager-Y6VYEWSJ.js +2 -0
- package/dist/chunks/running-session-ANMBA5XV.js +2 -0
- package/dist/chunks/skills-XL2XIBWV.js +2 -0
- package/dist/chunks/{tool-dispatch-MLM3QTSU.js → tool-dispatch-2FOG65FC.js} +1 -1
- package/dist/chunks/{utils-2QNMYRGA.js → utils-XZ22R6VB.js} +1 -1
- package/dist/client-history.js +2 -0
- package/dist/history-turn.js +3 -0
- package/dist/index.d.ts +19 -19
- package/dist/index.js +2 -2
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1472 -1810
- package/dist/kodax_doctor.js +1 -1
- package/dist/maintenance-scheduler.js +2 -0
- package/dist/manual-topics.json +32 -3
- package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
- package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/one-shot-task.js +1 -1
- package/dist/provider-auth-cli.js +1 -1
- package/dist/runtime-daemon-schema.json +1 -1
- package/dist/sandbox-network-broker.js +93 -441
- package/dist/sdk-a2a.d.ts +13 -13
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +17 -12
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-client.d.ts +6 -6
- package/dist/sdk-client.js +1 -1
- package/dist/sdk-coding.d.ts +17 -17
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +2 -2
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +4 -2
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +13 -13
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +16 -16
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +46 -46
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +7 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +87 -435
- package/dist/storage-repair-cli.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-CJliu5-D.d.ts → bash-prefix-extractor.d-BghXa_md.d.ts} +9 -3
- package/dist/types-chunks/{capsule.d-EMwSALqK.d.ts → capsule.d-BTlvC5qq.d.ts} +4 -4
- package/dist/types-chunks/{client-contract-B7q69yMA.d.ts → client-contract-B7ZSFKTv.d.ts} +52 -4
- package/dist/types-chunks/{controller.d-C0SAuNKu.d.ts → controller.d-Btu5FDdw.d.ts} +1 -1
- package/dist/types-chunks/{controller.d-D-hPLKaA.d.ts → controller.d-D6rEz5LS.d.ts} +3 -3
- package/dist/types-chunks/{history-retrieval.d-BwEUR9cb.d.ts → history-retrieval.d-B_AriUJp.d.ts} +1 -1
- package/dist/types-chunks/{manifest.d-YE3-AIeO.d.ts → manifest.d-Yyce-hHj.d.ts} +1 -1
- package/dist/types-chunks/{public-api.d-BhDU643p.d.ts → public-api.d-BLv3lFmw.d.ts} +9 -4
- package/dist/types-chunks/{review-inbox.d-Bgt46S7L.d.ts → review-inbox.d-yREk25Vf.d.ts} +2 -0
- package/dist/types-chunks/{review-packet.d-ChOfJaNI.d.ts → review-packet.d-xwXxHmML.d.ts} +1 -1
- package/dist/types-chunks/{run-manager.d-ChzguipG.d.ts → run-manager.d-D4sa9JYz.d.ts} +26 -12
- package/dist/types-chunks/{runtime-client-info-P_mRDG7j.d.ts → runtime-client-info-oRMrkHmb.d.ts} +2 -2
- package/dist/types-chunks/{runtime-event-BW5Pla7a.d.ts → runtime-event-BOyaILWg.d.ts} +3 -1
- package/dist/types-chunks/{sdk-runtime-cDe7qmN3.d.ts → sdk-runtime-CYyXmQok.d.ts} +27 -13
- package/dist/types-chunks/{sdk-session-D3pcSbnA.d.ts → sdk-session-D6mS5qgO.d.ts} +6 -3
- package/dist/types-chunks/{skill-invocation-error.d-gsNNDnnt.d.ts → skill-invocation-error.d-Be3qg4JQ.d.ts} +3 -3
- package/dist/types-chunks/{trusted-repl-entry-Bbkd2HlO.d.ts → trusted-repl-entry-YWNc4m-Z.d.ts} +7 -7
- package/dist/types-chunks/{types.d-BlXTogOo.d.ts → types.d-BQ-hbni4.d.ts} +1 -1
- package/dist/types-chunks/{utils.d-CxHyBvO6.d.ts → utils.d-C0F3Uf2X.d.ts} +6 -6
- package/dist/windows-effect-job-programs.json +4 -0
- package/docs/ARTIFACT_SDK.md +3 -3
- package/docs/CLIENT_CONTRACT.md +4 -2
- package/docs/SDK_MIGRATION.md +9 -5
- package/docs/SPACE_SDK_SEAMS.md +12 -1
- package/package.json +4 -3
- package/public_docs/README.md +10 -3
- package/public_docs/sdk/embedder-guide.md +1 -1
- package/dist/chunks/agent-DS7M57WD.js +0 -2
- package/dist/chunks/agent-adapter-TLWGGK3V.js +0 -2
- package/dist/chunks/argument-completer-OGCXKTRQ.js +0 -2
- package/dist/chunks/chunk-GJXOTOZB.js +0 -465
- package/dist/chunks/chunk-KE2NBMAP.js +0 -20
- package/dist/chunks/chunk-OGTRDK4Q.js +0 -359
- package/dist/chunks/chunk-R2HTPDI7.js +0 -2
- package/dist/chunks/chunk-SDPZFH6M.js +0 -4
- package/dist/chunks/chunk-XDMNJW6J.js +0 -42
- package/dist/chunks/compaction-config-ECMOFP5H.js +0 -2
- package/dist/chunks/dist-5J53DGAO.js +0 -2
- package/dist/chunks/host-65E5NM5P.js +0 -2
- package/dist/chunks/readline-helpers-UZXWBRXQ.js +0 -2
- package/dist/chunks/run-manager-ZFACIZM2.js +0 -2
- package/dist/chunks/running-session-Q5Y6A2QV.js +0 -2
- package/dist/chunks/skills-TJP6BLZJ.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ar as KodaXWireReasoningEffort, aj as KodaXToolDefinition, al as KodaXToolResultContentItem, v as KodaXMessage } from './types.d-Bi8iUd6x.js';
|
|
2
2
|
import { K as KodaXBaseProvider } from './errors.d-D73qdYbS.js';
|
|
3
3
|
import { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './capability.d-DapzKxy3.js';
|
|
4
|
-
import { ai as KodaXJsonValue, aa as KodaXExtensionSessionRecord, ac as KodaXExtensionStore } from './review-inbox.d-
|
|
5
|
-
import { b9 as KodaXToolExecutionContext, c2 as ToolSideEffect, E as ExtensionExecutionScope } from './bash-prefix-extractor.d-
|
|
6
|
-
import { k as AgentReasoningProfile } from './controller.d-
|
|
4
|
+
import { ai as KodaXJsonValue, aa as KodaXExtensionSessionRecord, ac as KodaXExtensionStore } from './review-inbox.d-yREk25Vf.js';
|
|
5
|
+
import { b9 as KodaXToolExecutionContext, c2 as ToolSideEffect, E as ExtensionExecutionScope } from './bash-prefix-extractor.d-BghXa_md.js';
|
|
6
|
+
import { k as AgentReasoningProfile } from './controller.d-D6rEz5LS.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* KodaX Constructed-World types (FEATURE_087, v0.7.28).
|
package/dist/types-chunks/{trusted-repl-entry-Bbkd2HlO.d.ts → trusted-repl-entry-YWNc4m-Z.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as ResolvedAutoModeSettings, b as CommandDefinition, g as CommandSource, d as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, j as CurrentConfig, e as CommandInvocationRequest, h as CommandWorkflowInvocationRequest, t as RuntimeSurfaceStatus, S as SessionCommandBinding } from './utils.d-
|
|
2
|
-
import { c as CanonicalPermissionMode, h as ConfirmResult, o as HistoryItem, ai as SessionStorage$1, L as LearningBinding } from './public-api.d-
|
|
3
|
-
import { au as KodaXResult, ab as KodaXOptions } from './bash-prefix-extractor.d-
|
|
4
|
-
import { W as ExecPolicyRuleInput, r as AutoModeStats } from './run-manager.d-
|
|
5
|
-
import {
|
|
6
|
-
import { an as KodaXInputArtifact, _ as AskUserQuestionOptions, W as AskUserAnswer, a0 as AskUserUnanswered, Y as AskUserMultiOptions } from './types.d-
|
|
7
|
-
import { aH as KodaXSessionStorage, as as KodaXSessionData } from './review-inbox.d-
|
|
1
|
+
import { r as ResolvedAutoModeSettings, b as CommandDefinition, g as CommandSource, d as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, j as CurrentConfig, e as CommandInvocationRequest, h as CommandWorkflowInvocationRequest, t as RuntimeSurfaceStatus, S as SessionCommandBinding } from './utils.d-C0F3Uf2X.js';
|
|
2
|
+
import { c as CanonicalPermissionMode, h as ConfirmResult, o as HistoryItem, ai as SessionStorage$1, L as LearningBinding } from './public-api.d-BLv3lFmw.js';
|
|
3
|
+
import { au as KodaXResult, ab as KodaXOptions } from './bash-prefix-extractor.d-BghXa_md.js';
|
|
4
|
+
import { W as ExecPolicyRuleInput, r as AutoModeStats } from './run-manager.d-D4sa9JYz.js';
|
|
5
|
+
import { aD as ClientToolInvocationInput, am as ClientSessionCancelInput, an as ClientSessionCancelReceipt, au as ClientSessionSettingsPatch, ai as ClientRunStopReceipt, ax as ClientSessionView, a2 as ClientObserveOptions, K as ClientItemReadOptions, J as ClientItemContent, w as ClientHistoryReadOptions, v as ClientHistoryPage, H as ClientInteractionResponse, a6 as ClientPermissionInteractionOptions, G as ClientInteraction, aF as ClientViewItem } from './client-contract-B7ZSFKTv.js';
|
|
6
|
+
import { an as KodaXInputArtifact, _ as AskUserQuestionOptions, W as AskUserAnswer, a0 as AskUserUnanswered, Y as AskUserMultiOptions } from './types.d-BQ-hbni4.js';
|
|
7
|
+
import { aH as KodaXSessionStorage, as as KodaXSessionData } from './review-inbox.d-yREk25Vf.js';
|
|
8
8
|
|
|
9
9
|
/** Host-owned user Stop; acceptance is distinct from execution settlement. */
|
|
10
10
|
interface RuntimeStopControl {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as KodaXMessage, W as KodaXReasoningRequest, ah as KodaXTokenUsage } from './types.d-Bi8iUd6x.js';
|
|
2
|
-
import { a9 as KodaXCompactMemorySeed, ao as KodaXSessionArtifactLedgerEntry } from './review-inbox.d-
|
|
2
|
+
import { a9 as KodaXCompactMemorySeed, ao as KodaXSessionArtifactLedgerEntry } from './review-inbox.d-yREk25Vf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* FEATURE_222 — user-interaction primitive (agent layer).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { aJ as KodaXSessionUiHistoryItem, ax as KodaXSessionLineage, ao as KodaXSessionArtifactLedgerEntry, ab as KodaXExtensionSessionState, aa as KodaXExtensionSessionRecord, aF as KodaXSessionRuntimeInfo, af as KodaXGoalState, ba as MemoryManagementController, bz as PendingEpisodeReviewSummary } from './review-inbox.d-
|
|
1
|
+
import { aJ as KodaXSessionUiHistoryItem, ax as KodaXSessionLineage, ao as KodaXSessionArtifactLedgerEntry, ab as KodaXExtensionSessionState, aa as KodaXExtensionSessionRecord, aF as KodaXSessionRuntimeInfo, af as KodaXGoalState, ba as MemoryManagementController, bz as PendingEpisodeReviewSummary } from './review-inbox.d-yREk25Vf.js';
|
|
2
2
|
import { v as KodaXMessage, U as KodaXReasoningMode, i as KodaXCustomProviderConfig, B as KodaXProviderCapabilityProfile } from './types.d-Bi8iUd6x.js';
|
|
3
|
-
import { bv as WorkflowProcessSource, bu as WorkflowProcessSnapshot, bn as WorkflowProcessEvent } from './types.d-
|
|
4
|
-
import { U as KodaXContextTokenSnapshot, aO as KodaXSkillDynamicContextPolicy, aP as KodaXSkillInvocationContext, x as KodaXAgentMode, ab as KodaXOptions, ap as KodaXRepoIntelligenceMode, au as KodaXResult } from './bash-prefix-extractor.d-
|
|
5
|
-
import { d as AgentsFile,
|
|
6
|
-
import {
|
|
3
|
+
import { bv as WorkflowProcessSource, bu as WorkflowProcessSnapshot, bn as WorkflowProcessEvent } from './types.d-BQ-hbni4.js';
|
|
4
|
+
import { U as KodaXContextTokenSnapshot, aO as KodaXSkillDynamicContextPolicy, aP as KodaXSkillInvocationContext, x as KodaXAgentMode, ab as KodaXOptions, ap as KodaXRepoIntelligenceMode, au as KodaXResult } from './bash-prefix-extractor.d-BghXa_md.js';
|
|
5
|
+
import { d as AgentsFile, am as WorkflowRunProcessMetadata, a4 as ManagedWorkflowSnapshot, r as AutoModeStats, _ as KodaXMcpServersConfig } from './run-manager.d-D4sa9JYz.js';
|
|
6
|
+
import { aP as KodaXProductClient, at as ClientSessionSettings } from './client-contract-B7ZSFKTv.js';
|
|
7
7
|
import * as readline from 'readline';
|
|
8
|
-
import { U as PermissionMode, L as LearningBinding, M as LearningSurfaceSnapshot } from './public-api.d-
|
|
8
|
+
import { U as PermissionMode, L as LearningBinding, M as LearningSurfaceSnapshot } from './public-api.d-BLv3lFmw.js';
|
|
9
9
|
import { SpawnSyncReturns } from 'child_process';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"effectJob": "\n$ErrorActionPreference = 'Stop'\ntry {\n $payload = [Text.Encoding]::UTF8.GetString(\n [Convert]::FromBase64String($env:KODAX_EFFECT_JOB_PAYLOAD)) | ConvertFrom-Json\n Remove-Item Env:KODAX_EFFECT_JOB_PAYLOAD -ErrorAction SilentlyContinue\n $source = @'\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Threading;\n\npublic static class KodaXEffectJob {\n [StructLayout(LayoutKind.Sequential)]\n private struct IoCounters {\n public ulong ReadOperationCount;\n public ulong WriteOperationCount;\n public ulong OtherOperationCount;\n public ulong ReadTransferCount;\n public ulong WriteTransferCount;\n public ulong OtherTransferCount;\n }\n\n [StructLayout(LayoutKind.Sequential)]\n private struct BasicLimitInformation {\n public long PerProcessUserTimeLimit;\n public long PerJobUserTimeLimit;\n public uint LimitFlags;\n public UIntPtr MinimumWorkingSetSize;\n public UIntPtr MaximumWorkingSetSize;\n public uint ActiveProcessLimit;\n public UIntPtr Affinity;\n public uint PriorityClass;\n public uint SchedulingClass;\n }\n\n [StructLayout(LayoutKind.Sequential)]\n private struct ExtendedLimitInformation {\n public BasicLimitInformation BasicLimitInformation;\n public IoCounters IoInfo;\n public UIntPtr ProcessMemoryLimit;\n public UIntPtr JobMemoryLimit;\n public UIntPtr PeakProcessMemoryUsed;\n public UIntPtr PeakJobMemoryUsed;\n }\n\n [StructLayout(LayoutKind.Sequential)]\n private struct BasicAccountingInformation {\n public long TotalUserTime;\n public long TotalKernelTime;\n public long ThisPeriodTotalUserTime;\n public long ThisPeriodTotalKernelTime;\n public uint TotalPageFaultCount;\n public uint TotalProcesses;\n public uint ActiveProcesses;\n public uint TotalTerminatedProcesses;\n }\n\n [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n private static extern IntPtr CreateJobObjectW(IntPtr attributes, string name);\n\n [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n private static extern IntPtr OpenJobObjectW(uint desiredAccess, bool inheritHandle, string name);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool SetInformationJobObject(\n IntPtr job,\n int infoClass,\n ref ExtendedLimitInformation info,\n uint length);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool QueryInformationJobObject(\n IntPtr job,\n int infoClass,\n out BasicAccountingInformation info,\n uint length,\n IntPtr returnLength);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern IntPtr OpenProcess(uint access, bool inheritHandle, uint processId);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern uint WaitForSingleObject(IntPtr handle, uint milliseconds);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool GetExitCodeProcess(IntPtr process, out uint exitCode);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool TerminateJobObject(IntPtr job, uint exitCode);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool CloseHandle(IntPtr handle);\n\n private const uint Synchronize = 0x00100000;\n private const uint ProcessTerminate = 0x0001;\n private const uint ProcessSetQuota = 0x0100;\n private const uint ProcessQueryLimitedInformation = 0x1000;\n private const uint JobObjectTerminate = 0x0008;\n private const uint JobObjectQuery = 0x0004;\n private const uint JobObjectLimitKillOnJobClose = 0x00002000;\n private const uint WaitObject0 = 0;\n\n private static void Require(bool result, string operation) {\n if (!result) throw new InvalidOperationException(\n operation + \" failed with Win32 error \" + Marshal.GetLastWin32Error());\n }\n\n private static void PublishReady() {\n Console.Out.WriteLine(\"READY\");\n Console.Out.Flush();\n }\n\n public static void Run(uint targetPid, uint ownerPid, string jobName) {\n var job = CreateJobObjectW(IntPtr.Zero, jobName);\n if (job == IntPtr.Zero) throw new InvalidOperationException(\n \"CreateJobObject failed with Win32 error \" + Marshal.GetLastWin32Error());\n var processAccess = Synchronize | ProcessTerminate | ProcessSetQuota | ProcessQueryLimitedInformation;\n var target = OpenProcess(processAccess, false, targetPid);\n var owner = OpenProcess(Synchronize, false, ownerPid);\n if (target == IntPtr.Zero || owner == IntPtr.Zero) {\n if (target != IntPtr.Zero) CloseHandle(target);\n if (owner != IntPtr.Zero) CloseHandle(owner);\n CloseHandle(job);\n throw new InvalidOperationException(\n \"OpenProcess failed with Win32 error \" + Marshal.GetLastWin32Error());\n }\n try {\n var limits = new ExtendedLimitInformation();\n limits.BasicLimitInformation.LimitFlags = JobObjectLimitKillOnJobClose;\n Require(SetInformationJobObject(\n job,\n 9,\n ref limits,\n (uint)Marshal.SizeOf(typeof(ExtendedLimitInformation))),\n \"SetInformationJobObject\");\n Require(AssignProcessToJobObject(job, target), \"AssignProcessToJobObject\");\n PublishReady();\n\n uint targetExitCode = 1;\n while (true) {\n if (WaitForSingleObject(owner, 0) == WaitObject0) break;\n if (WaitForSingleObject(target, 0) == WaitObject0) {\n GetExitCodeProcess(target, out targetExitCode);\n break;\n }\n Thread.Sleep(20);\n }\n\n Require(TerminateJobObject(job, targetExitCode), \"TerminateJobObject\");\n while (true) {\n BasicAccountingInformation accounting;\n Require(QueryInformationJobObject(\n job,\n 1,\n out accounting,\n (uint)Marshal.SizeOf(typeof(BasicAccountingInformation)),\n IntPtr.Zero),\n \"QueryInformationJobObject\");\n if (accounting.ActiveProcesses == 0) return;\n Thread.Sleep(10);\n }\n } finally {\n CloseHandle(owner);\n CloseHandle(target);\n CloseHandle(job);\n }\n }\n\n public static bool TerminateAndDrain(string jobName) {\n var job = OpenJobObjectW(JobObjectTerminate | JobObjectQuery, false, jobName);\n if (job == IntPtr.Zero) {\n var error = Marshal.GetLastWin32Error();\n if (error == 2) return false;\n throw new InvalidOperationException(\n \"OpenJobObject failed with Win32 error \" + error);\n }\n try {\n Require(TerminateJobObject(job, 1), \"TerminateJobObject\");\n while (true) {\n BasicAccountingInformation accounting;\n Require(QueryInformationJobObject(\n job,\n 1,\n out accounting,\n (uint)Marshal.SizeOf(typeof(BasicAccountingInformation)),\n IntPtr.Zero),\n \"QueryInformationJobObject\");\n if (accounting.ActiveProcesses == 0) return true;\n Thread.Sleep(10);\n }\n } finally {\n CloseHandle(job);\n }\n }\n\n}\n'@\n Add-Type -TypeDefinition $source\n if ($payload.action -eq 'recover') {\n $drained = [KodaXEffectJob]::TerminateAndDrain([string]$payload.jobName)\n [Console]::Out.WriteLine($(if ($drained) { 'DRAINED' } else { 'NOT_FOUND' }))\n [Console]::Out.Flush()\n } else {\n [KodaXEffectJob]::Run(\n [uint32]$payload.targetPid,\n [uint32]$payload.ownerPid,\n [string]$payload.jobName)\n }\n exit 0\n} catch {\n [Console]::Out.WriteLine('ERROR:' + $_.Exception.Message)\n [Console]::Out.Flush()\n exit 1\n}",
|
|
3
|
+
"sidProbe": "\n$ErrorActionPreference = 'Stop'\ntry {\n $payload = [Text.Encoding]::UTF8.GetString(\n [Convert]::FromBase64String($env:KODAX_EFFECT_JOB_PAYLOAD)) | ConvertFrom-Json\n Remove-Item Env:KODAX_EFFECT_JOB_PAYLOAD -ErrorAction SilentlyContinue\n $source = @'\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\n\npublic static class KodaXSidProbe {\n [StructLayout(LayoutKind.Sequential)]\n private struct WtsProcessInformation {\n public uint SessionId;\n public uint ProcessId;\n public IntPtr ProcessName;\n public IntPtr UserSid;\n }\n\n [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n private struct ProcessEntry32 {\n public uint Size;\n public uint Usage;\n public uint ProcessId;\n public UIntPtr DefaultHeapId;\n public uint ModuleId;\n public uint Threads;\n public uint ParentProcessId;\n public int PriorityClassBase;\n public uint Flags;\n [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]\n public string ExecutableFile;\n }\n\n [DllImport(\"wtsapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n private static extern bool WTSEnumerateProcessesW(\n IntPtr server,\n uint reserved,\n uint version,\n out IntPtr processInformation,\n out uint count);\n\n [DllImport(\"wtsapi32.dll\")]\n private static extern void WTSFreeMemory(IntPtr memory);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern IntPtr CreateToolhelp32Snapshot(uint flags, uint processId);\n\n [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n private static extern bool Process32FirstW(IntPtr snapshot, ref ProcessEntry32 entry);\n\n [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n private static extern bool Process32NextW(IntPtr snapshot, ref ProcessEntry32 entry);\n\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool CloseHandle(IntPtr handle);\n\n private static Dictionary<uint, uint> ProcessParents() {\n var parents = new Dictionary<uint, uint>();\n var snapshot = CreateToolhelp32Snapshot(0x00000002, 0);\n if (snapshot == new IntPtr(-1)) throw new InvalidOperationException(\n \"CreateToolhelp32Snapshot failed with Win32 error \" + Marshal.GetLastWin32Error());\n try {\n var entry = new ProcessEntry32();\n entry.Size = (uint)Marshal.SizeOf(typeof(ProcessEntry32));\n if (!Process32FirstW(snapshot, ref entry)) throw new InvalidOperationException(\n \"Process32First failed with Win32 error \" + Marshal.GetLastWin32Error());\n do {\n parents[entry.ProcessId] = entry.ParentProcessId;\n entry.Size = (uint)Marshal.SizeOf(typeof(ProcessEntry32));\n } while (Process32NextW(snapshot, ref entry));\n } finally {\n CloseHandle(snapshot);\n }\n return parents;\n }\n\n private static HashSet<uint> MatchingProcesses(SecurityIdentifier expected) {\n var matches = new HashSet<uint>();\n IntPtr processes;\n uint count;\n if (!WTSEnumerateProcessesW(IntPtr.Zero, 0, 1, out processes, out count)) {\n throw new InvalidOperationException(\n \"WTSEnumerateProcesses failed with Win32 error \" + Marshal.GetLastWin32Error());\n }\n try {\n var entrySize = Marshal.SizeOf(typeof(WtsProcessInformation));\n for (uint index = 0; index < count; index++) {\n var address = new IntPtr(processes.ToInt64() + ((long)index * entrySize));\n var entry = (WtsProcessInformation)Marshal.PtrToStructure(\n address,\n typeof(WtsProcessInformation));\n if (entry.UserSid == IntPtr.Zero) continue;\n if (new SecurityIdentifier(entry.UserSid).Equals(expected)) matches.Add(entry.ProcessId);\n }\n } finally {\n WTSFreeMemory(processes);\n }\n return matches;\n }\n\n private static bool DescendsFrom(\n uint process,\n uint root,\n Dictionary<uint, uint> parents\n ) {\n var visited = new HashSet<uint>();\n while (process != 0 && visited.Add(process)) {\n if (process == root) return true;\n if (!parents.ContainsKey(process)) return false;\n process = parents[process];\n }\n return false;\n }\n\n public static bool HasOtherProcessWithSid(string expectedSid, bool ignoreProbeTree) {\n var expected = new SecurityIdentifier(expectedSid);\n using (var identity = WindowsIdentity.GetCurrent()) {\n var sameUser = identity.User != null && identity.User.Equals(expected);\n var administrator = new WindowsPrincipal(identity)\n .IsInRole(WindowsBuiltInRole.Administrator);\n if (ignoreProbeTree && !sameUser) {\n throw new InvalidOperationException(\"Process-tree SID probe must run as the expected sandbox user\");\n }\n if (!ignoreProbeTree && !sameUser && !administrator) {\n throw new InvalidOperationException(\n \"Machine-wide inspection of a foreign Windows SID requires an elevated administrator token\");\n }\n }\n var matches = MatchingProcesses(expected);\n if (!ignoreProbeTree) return matches.Count > 0;\n var current = (uint)Process.GetCurrentProcess().Id;\n if (!matches.Contains(current)) throw new InvalidOperationException(\n \"SID probe could not observe its own process\");\n var parents = ProcessParents();\n var root = parents.ContainsKey(current) ? parents[current] : current;\n foreach (var process in matches) {\n if (!DescendsFrom(process, root, parents)) return true;\n }\n return false;\n }\n}\n'@\n Add-Type -TypeDefinition $source\n $active = [KodaXSidProbe]::HasOtherProcessWithSid(\n [string]$payload.sid,\n [bool]$payload.ignoreCurrentProcessTree)\n [Console]::Out.WriteLine($(if ($active) { 'ACTIVE' } else { 'CLEAR' }))\n [Console]::Out.Flush()\n exit 0\n} catch {\n [Console]::Out.WriteLine('ERROR:' + $_.Exception.Message)\n [Console]::Out.Flush()\n exit 1\n}"
|
|
4
|
+
}
|
package/docs/ARTIFACT_SDK.md
CHANGED
|
@@ -103,11 +103,11 @@ previous verification limits.
|
|
|
103
103
|
| `prepare(signal?)` | Explicit compatible Chromium preparation; custom executables remain the trusted host's responsibility |
|
|
104
104
|
| `create`, `edit`, `export` | Existing PPTX authoring, limited text/geometry repair, exclusive new output; no new-format editors |
|
|
105
105
|
| `open` | Content-identified PPTX/PDF/DOCX/PNG/JPEG/WebP/SVG/HTML identity; PPTX object inspection; intrinsic PPTX/PDF page count |
|
|
106
|
-
| `render` | PPTX, native PDF, exact PNG bytes, JPEG/WebP/SVG rasters, candidate
|
|
106
|
+
| `render` | PPTX, native PDF, exact PNG bytes, JPEG/WebP/SVG rasters, DOCX pages (host LibreOffice conversion by default when configured; lightweight candidate otherwise) |
|
|
107
107
|
| `capture` | Static image/SVG regions; PDF/DOCX pages; local HTML `loaded` state at explicit viewport, sequence `0`; actual SVG SMIL seconds |
|
|
108
108
|
| `readEvidence` | Provenance/current file and dependency hashes, actual PNG hash/geometry/bounds, then PNG data as base64 |
|
|
109
109
|
|
|
110
|
-
Missing capability records do not imply support.
|
|
110
|
+
Missing capability records do not imply support. When the host supplies `libreOfficeExecutable`, DOCX render defaults to `backend: 'libreoffice'`: the DOCX snapshot is converted to PDF and rendered by PDF.js, while evidence stays bound to the DOCX source hash and the result may be `ready` with a non-blocking `docx-converted` note. Conversion can recalculate page-number fields; a table of contents can remain empty or outdated and needs review. Field values and pagination must be checked against the intended Word/WPS output. The lightweight backend (no converter, or `backend: 'lightweight'`) stays **unverified** with a blocking `docx-preview-fidelity` diagnostic, and a document the lightweight renderer cannot lay out returns structured `docx-render-failed` instead of throwing. DOCX `open` has no `pages`; pagination belongs to `evidence.layout.totalPages`. Minimal documents without settings are normalized only in the rendering snapshot; source bytes stay unchanged. Fields, floating objects, complex sections and native Office pagination need reference validation.
|
|
111
111
|
|
|
112
112
|
PPTX geometry uses inches. Text/rectangle colors are six hexadecimal digits without `#` (for example, `172C45`). `edit` uses inspected `page/objectId`, the current `expectedSourceHash` and an exclusive new `output`. Text replacement supports a single run in a single paragraph; rich-run/multi-paragraph text needs another compatible editor. Geometry edits retain their existing bounds and grouped-object limitations. Use `render({ path, pages })` for PPTX page evidence; PPTX does not implement `capture`.
|
|
113
113
|
|
|
@@ -151,7 +151,7 @@ if (result.evidence) {
|
|
|
151
151
|
}
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Browser/LibreOffice executable paths and workspace authority belong to trusted runtime options, never model request JSON. LibreOffice is optional for PPTX conversion
|
|
154
|
+
Browser/LibreOffice executable paths and workspace authority belong to trusted runtime options, never model request JSON. LibreOffice is optional for PPTX and DOCX conversion; other supported formats do not require it. On Windows, a configured `soffice.exe` runs through its sibling console entry `soffice.com`, because the GUI launcher blocks on command-line calls. Render capability records include `backend: 'lightweight' | 'libreoffice'`; select by operation, format and backend. LibreOffice availability checks the configured absolute file and browser presence without launching either; its identity/version is checked during rendering. Preparation may download the pinned Playwright browser and write its cache; ordinary permission/sandbox rules apply. Querying/rendering never installs implicitly.
|
|
155
155
|
|
|
156
156
|
## Existing shared KodaX Host
|
|
157
157
|
|
package/docs/CLIENT_CONTRACT.md
CHANGED
|
@@ -132,7 +132,7 @@ Host owner 实际销毁视图服务时,先停止新的读取、刷新和监听
|
|
|
132
132
|
| `sessions` Auto 诊断 | `getAutoModeStats` | 返回现有 Host Auto 拒绝、熔断和分类器健康事实;非 Auto 为 undefined,不创建第二套权限状态 |
|
|
133
133
|
| `sessions` 显示 | `observe`, `readItem` | 当前显示视图及其替换;补读显示项的完整正文或工具输入 |
|
|
134
134
|
| `sessions` 图片附件 | `readItem(..., {part:'attachment', attachmentIndex, attachmentOffset, expectedImageSha256})` | 读取该 Host 项已附带的 PNG 字节块;不接受客户端文件路径 |
|
|
135
|
-
| `sessions` 历史 | `readHistory`, `readHistoryEntry`, `searchHistory` | 规范对话分页、超大项正文和全 Session
|
|
135
|
+
| `sessions` 历史 | `readHistory`, `readHistoryEntry`, `searchHistory`, `resolveHistoryTurn` | 规范对话分页、超大项正文和全 Session 搜索。支持时可定位搜索结果,并为 Fork/回退解析完整轮尾。 |
|
|
136
136
|
| `sessions` 目标 | `readGoal`, `createGoal`, `pauseGoal`, `resumeGoal`, `clearGoal` | 读取及修改共享持久目标;创建、状态转换和预算遵守领域约束 |
|
|
137
137
|
| `sessions` 通知 | `appendNotice` | 由 Host 保存通知正文及可选来源 |
|
|
138
138
|
| `sessions` 分支 | `readLineage`, `labelEntry`, `selectBranch`, `rewindSession`, `forkSession`, `recoverSession` | 读取分支、标签、选择头、回退,以及派生新 Session |
|
|
@@ -213,8 +213,10 @@ Learning/Workflow 订阅的 `ready` 只表示 Host 已完成注册,不表示
|
|
|
213
213
|
Session 可选 `planModeEffort` 表达明确的计划模式默认:Host 仅在模式为 `plan` 且没有 Session `effort` 覆盖时采用它;离开计划模式后恢复原有 effort 解析,客户端无需回写缓存。`null` 清除覆盖。既有 `sharedSessionSettings.keys` 声明支持;旧 Host 未列出该键时,新 SDK 在发送包含该字段的设置 mutation 前返回 `daemon_upgrade_required`,其他设置仍可使用,不提升整个 productClient 版本。ACP 初始化只提交明确的选项/环境意图,普通 prompt 不回写缓存设置;显式 prompt effort 和模式切换仍提交对应的窄设置意图。计划批准使用完整 `options.plan`,Host 模式变化通过 ACP `current_mode_update` 显示。
|
|
214
214
|
|
|
215
215
|
Session 可选 `workMode` 为 `agent | coding | script`,缺失或 `null` 清除后采用 Coding;它不是权限或 AMA 模式,也不是全局 config 字段。
|
|
216
|
-
|
|
216
|
+
仅首次 Run 被接纳前经同一 Session owner 选择;之后普通、versioned mutation 和单次 Run 参数均拒绝改成其他模式(同值写入允许)。版本化设置快照返回只读 `workModeLocked`;Host 持久化该事实,重启、历史清理或 Run 索引淘汰不会解锁,已有完整 lineage 的会话同样锁定。
|
|
217
217
|
选择随 Session 重启恢复,模型切换不修改它。旧 Host 未在 `sharedSessionSettings.keys` 声明 workMode 时,客户端在 mutation 前明确拒绝并要求升级。
|
|
218
|
+
新版 Host 仅为新会话显式记录首轮前状态;旧版或导入会话缺少该事实时保持原模式,需新建会话才能另选。不在启动时读取、改写所有历史正文。
|
|
219
|
+
旧格式 Session 的同一 Run/Turn generation 恢复延续原有效执行模式:原身份、已停止 owner、精确 checkpoint 和 fresh authority 均须通过现有校验。它不选择或回写 Session 模式,也不写入新的锁标记;后续新 Run 和设置 mutation 继续受 Session 锁约束。持久 Run 模式与原执行快照不一致时拒绝恢复;新绑定不能改变原有效模式。显式新格式锁元数据不享有该兼容路径。
|
|
218
220
|
Script 选择及 Run 准入进行无工具、无模型的本地 VM 可用性检查;失败保留原选择,不能先生成再发现执行器缺失。
|
|
219
221
|
首轮提供完整叶契约,原生控制项、undo 和支持后台命令的 bash 保留;回执与原生错误证据保留,未结算 cell 不自动重放。
|
|
220
222
|
当前 Windows 离线证据及尚未验证的完整任务效果见 [工具总计划](designs/tool-portfolio-plan.md)。
|
package/docs/SDK_MIGRATION.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# SDK 统一 Client 契约迁移指南
|
|
2
2
|
|
|
3
|
-
适用范围:当前工作树的 FEATURE_298/299/301 实现;本次核对的包版本为 `0.7.97-beta.
|
|
3
|
+
适用范围:当前工作树的 FEATURE_298/299/301 实现;本次核对的包版本为 `0.7.97-beta.3`,随 `v0.7.97-beta.3` 标签发布(npm 发布为手动步骤)。接入前应核对所安装包的导出和 Host 能力;下文带日期的 beta.1/beta.2 记录保留各自历史范围。
|
|
4
4
|
|
|
5
5
|
Space 的可信授权绑定、canonical Fork/Retry/Rewind、宿主配置、附件/统计与退出恢复范围见 [SDK/Host 接缝](SPACE_SDK_SEAMS.md)。
|
|
6
6
|
|
|
7
|
+
从 beta.2 升级后,检查 Host 的 `productHistoryLocation` 和 `productHistoryTurnResolution` 再启用搜索定位和整轮操作。旧会话无需改写。保留 SDK 返回的字符串修订和确认时的分支头;收到过期结果时重新选择目标。
|
|
8
|
+
|
|
7
9
|
2026-11-02 发布验收修复中,扩展 API `exec()` 的 PowerShell 启动改为
|
|
8
10
|
`-NoLogo -NoProfile -NonInteractive`,避免隐式执行用户 profile 和交互提示。
|
|
9
11
|
依赖 profile 内函数或 alias 的扩展需在命令中显式初始化(例如 `Import-Module`)。
|
|
@@ -18,8 +20,8 @@ Solo 和 Adaptive 都会向模型提供可用且已授权的 Skill 目录。运
|
|
|
18
20
|
## 2026-11-03 beta.1 后续修复(未发布)
|
|
19
21
|
|
|
20
22
|
本轮基线为 `v0.7.97-beta.1` / `e733e51f`,后续修复已随 `v0.7.97-beta.2` 发布
|
|
21
|
-
(npm
|
|
22
|
-
`latest` 指向稳定版 0.7.96
|
|
23
|
+
(npm 发布为手动步骤)。截至 2026-11-07,`beta` 指向 beta.2、
|
|
24
|
+
`latest` 指向稳定版 0.7.96,这是正常发布策略。下述后续修复须分别验证源码、
|
|
23
25
|
正式包、实际运行 Host 和 Space 成品,不能用本地版本号推断旧 Host 已升级。
|
|
24
26
|
|
|
25
27
|
- Promotion 提交后,已有/新增/第二客户端观察者须刷新元数据及历史边界;
|
|
@@ -523,7 +525,7 @@ Space 或其他外部客户端已升级,也不要求独立库与 Product Clien
|
|
|
523
525
|
|
|
524
526
|
| 当前能力 | SDK 消费要求 |
|
|
525
527
|
| --- | --- |
|
|
526
|
-
| Agent / Coding / 实验性 Script | 用 Session `workMode`
|
|
528
|
+
| Agent / Coding / 实验性 Script | 用 Session `workMode` 在首轮前选择,之后固定;版本化设置快照的 `workModeLocked` 表示只读;独立 SDK 边界见下文 |
|
|
527
529
|
| MCP/工具完整结果 | 工具项的 `outputPath` 标明 Host 保存的原文;使用 `readItem` 或 `readHistoryEntry` 的 `part:'original'`,不要在客户端直接打开路径 |
|
|
528
530
|
| 任务报告 | Product 项用 `taskResult`;`/session` transcript 的 `taskResults` 用 `KodaXTaskResultReport[]`,允许未知状态与缺失 taskId |
|
|
529
531
|
| 流式进度 | thinking 和有调用 ID 的 tool-input 均可带 `estimatedTokenCount`;显示 `~… tokens`,不能当成 Provider usage 或把 UTF-16 分页偏移改成 token |
|
|
@@ -560,7 +562,9 @@ TUI、桌面 UI、IDE、自动化应用接入共享 KodaX 时,以 `KodaXProduc
|
|
|
560
562
|
|
|
561
563
|
根入口和上述底层导出尚未全部删除,也没有因为本次迁移就全部成为 TypeScript `@deprecated`。产品接入应迁走它们承担的业务职责;确需底层能力的受信任宿主仍可明确使用。客户端不能在连接失败时创建私有 Runtime,形成第二个 Session 写入者。
|
|
562
564
|
|
|
563
|
-
工作模式使用 `sessions.updateSettings(id, { workMode: 'agent' | 'coding' | 'script' })`;Coding
|
|
565
|
+
工作模式使用 `sessions.updateSettings(id, { workMode: 'agent' | 'coding' | 'script' })`;Coding 默认,仅首次 Run 被接纳前可选择,之后更换模式须新建 Session。`getSettingsVersioned` 返回只读 `workModeLocked`;旧 Host 缺少该字段时,产品 UI 应禁止修改并提示升级。
|
|
566
|
+
|
|
567
|
+
旧格式 Session 可能没有模式记录,但旧 Run 已持久化原执行配置。通过原身份、已停止 owner、checkpoint 和 fresh authority 校验后,同一 Run/Turn 可按原有效模式恢复;它不回填 Session 模式,也不写新锁标记,因此再次 checkpoint/restart 仍能恢复。后续新 Run 与普通/versioned 设置仍受 Session 锁约束。profile 和工具策略会影响有效模式,不能仅采用请求中的 `workMode` 字符串;持久 Run 事实与原快照冲突时明确拒绝。显式新格式锁元数据不适用该兼容路径;generation checkpoint v3 表达 Agent authority,不代表新锁格式。
|
|
564
568
|
产品 Host 能力由 `sharedSessionSettings.keys` 报告;旧 Host 不支持时明确拒绝,不静默丢弃。模型/权限设置与工作模式独立。
|
|
565
569
|
独立 `/coding` 的 `runManagedTask({ workMode: 'script', session: { storage }, ... }, prompt)` 要求可写 Session storage;
|
|
566
570
|
`persistedByHost:true` 的宿主须实现可选 `appendSessionRecords(id, records)` 原子追加接口,以免旧的全量快照覆盖宿主历史。
|
package/docs/SPACE_SDK_SEAMS.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Space 的 Product Client / Host 接缝
|
|
2
2
|
|
|
3
|
+
## beta.3 的会话历史
|
|
4
|
+
|
|
5
|
+
以下两个 Host 能力随 `v0.7.97-beta.3` 标签发布(npm 发布为手动步骤)。
|
|
6
|
+
|
|
7
|
+
| Host 能力 | 客户端行为 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `productHistoryLocation: 1` | 向 `sessions.readHistory` 传 `around: { searchItemId }` 或 `around: { historyBoundary }`,使用返回的 `locatedBoundaryId` 定位。按 `nextCursor` 读更早记录,按 `newerCursor` 读更新记录。仅搜索原文可用时保留原文预览。 |
|
|
10
|
+
| `productHistoryTurnResolution: 1` | 在 Fork/回退前调用 `sessions.resolveHistoryTurn`。行内目标传 SDK 项和来源,菜单使用 `latest` 或 `previous`,显式命令使用零基 `index`。完整轮尾包含已持久化的工具结果。写入时交回 `historyBoundary`,回退还须交回确认过的 `expectedHead`。 |
|
|
11
|
+
|
|
12
|
+
两个能力均支持可选建连要求。Space 在连接后按操作检查 Host 能力,使旧 Host 仍可提供已有的浏览及搜索原文。来源修订使用 SDK 返回的字符串;新保存的 view 项暂缺修订时,可以提交其稳定输入或输出身份由 SDK 验证。浏览与解析只读,均不调用模型。
|
|
13
|
+
|
|
3
14
|
## 2026-11-02 后续接手:默认方法与 Quick Ask(alpha.12 之后,未发布)
|
|
4
15
|
|
|
5
16
|
已发布 alpha.12 及 Space `codex/sdk-alpha12-preparation` 的先行适配仍是各自历史基线;
|
|
@@ -72,7 +83,7 @@ Main/Renderer 不传该标记、不改 inputId,也不需自行迁移队列文
|
|
|
72
83
|
新 SDK 仍待发布;Space 升级后验收默认保持/变更、普通与显式 redirect、冷恢复和原账号
|
|
73
84
|
保持,继续使用既有 API,不传内部队列标记,也不手改 pending 文件。
|
|
74
85
|
|
|
75
|
-
2026-10-18 的 Space 核查样本安装主 SDK `@kodax-ai/kodax@0.7.97-alpha.7`(用户提供,当时官方 registry 也可查该版本);此前独立 `@kodax-ai/artifacts` 的 E404 仅保留为历史核查;当前分发方案只发布主包。本文接缝按当前开发树 `0.7.97-beta.
|
|
86
|
+
2026-10-18 的 Space 核查样本安装主 SDK `@kodax-ai/kodax@0.7.97-alpha.7`(用户提供,当时官方 registry 也可查该版本);此前独立 `@kodax-ai/artifacts` 的 E404 仅保留为历史核查;当前分发方案只发布主包。本文接缝按当前开发树 `0.7.97-beta.3` 核对,不据此推断 Space 已升级;源码实现、npm 发布、Space 启用分别判断。下文旧日期的验收记录保留当时状态。业务操作采用 `/client`;可信 Main 负责授权与宿主配置,Space 负责输入身份、队列展示、view、IPC 与 Renderer 状态迁移。
|
|
76
87
|
|
|
77
88
|
## 2026-10-29 未发布 SDK 接入补充
|
|
78
89
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodax-ai/kodax",
|
|
3
|
-
"version": "0.7.97-beta.
|
|
3
|
+
"version": "0.7.97-beta.3",
|
|
4
4
|
"description": "KodaX lightweight coding agent - TypeScript implementation with 16 built-in LLM provider aliases, published as a Node-free single-file CLI and SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"config:templates:sync": "node scripts/sync-config-templates.mjs",
|
|
108
108
|
"config:templates:check": "node scripts/sync-config-templates.mjs --check",
|
|
109
109
|
"build:dts": "node scripts/build-dts.mjs",
|
|
110
|
-
"build:packages": "tsc -b tsconfig.build.json && npm run copy:builtin -w @kodax-ai/agent && npm run copy:provider-caps -w @kodax-ai/llm && npm run build:browser -w @kodax-ai/artifacts",
|
|
110
|
+
"build:packages": "tsc -b tsconfig.build.json && npm run copy:builtin -w @kodax-ai/agent && npm run copy:runtime-programs -w @kodax-ai/agent && npm run copy:provider-caps -w @kodax-ai/llm && npm run build:browser -w @kodax-ai/artifacts",
|
|
111
111
|
"build:bundle": "node scripts/build-bundle.mjs",
|
|
112
112
|
"build:native": "node scripts/build-native.mjs",
|
|
113
113
|
"dev": "node --max-old-space-size=4096 --require ./scripts/production-env.cjs --import tsx src/kodax_bootstrap.ts",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"build:binary": "node scripts/build-binary.mjs",
|
|
122
122
|
"build:binary:all": "node scripts/build-binary.mjs --all",
|
|
123
123
|
"test": "vitest run",
|
|
124
|
-
"test:bundle": "node --test tests/bundled-space-host.test.mjs tests/release-sidecars.test.mjs tests/bundled-anthropic-history.test.mjs tests/bundled-daemon-help.test.mjs tests/bundled-storage-maintenance.test.mjs tests/bundled-oauth-recovery.test.mjs tests/bundled-session-crash-recovery.test.mjs tests/bundled-responses.test.mjs tests/bundled-llm-operations.test.mjs tests/bundled-manual-budget.test.mjs tests/bundled-provider-credentials.test.mjs tests/bundled-daemon-compaction.test.mjs tests/bundled-memory-review-shutdown.test.mjs tests/bundled-product-exit.test.mjs tests/bundled-shared-host-recovery.test.mjs tests/bundled-cli-host-recovery.test.mjs tests/bundled-text-permissions.test.mjs tests/bundled-image-validation.test.mjs tests/bundled-text-recovery.test.mjs tests/bundled-mcp-output-recovery.test.mjs tests/bundled-skills.test.mjs tests/image-codec-release.test.mjs tests/asrt-wfp-probe.test.mjs tests/asrt-wfp-build.test.mjs tests/script-release.test.mjs tests/bundled-task-results.test.mjs tests/bundled-shell-cleanup.test.mjs && node --test --test-concurrency=1 tests/bundled-startup-recovery.test.mjs tests/bundled-shared-profile-recovery.test.mjs",
|
|
124
|
+
"test:bundle": "node --test tests/bundled-daemon-maintenance.test.mjs tests/bundled-space-host.test.mjs tests/release-sidecars.test.mjs tests/bundled-anthropic-history.test.mjs tests/bundled-daemon-help.test.mjs tests/bundled-storage-maintenance.test.mjs tests/bundled-oauth-recovery.test.mjs tests/bundled-session-crash-recovery.test.mjs tests/bundled-responses.test.mjs tests/bundled-llm-operations.test.mjs tests/bundled-manual-budget.test.mjs tests/bundled-provider-credentials.test.mjs tests/bundled-daemon-compaction.test.mjs tests/bundled-memory-review-shutdown.test.mjs tests/bundled-product-exit.test.mjs tests/bundled-shared-host-recovery.test.mjs tests/bundled-cli-host-recovery.test.mjs tests/bundled-text-permissions.test.mjs tests/bundled-image-validation.test.mjs tests/bundled-text-recovery.test.mjs tests/bundled-mcp-output-recovery.test.mjs tests/bundled-skills.test.mjs tests/image-codec-release.test.mjs tests/asrt-wfp-probe.test.mjs tests/asrt-wfp-build.test.mjs tests/script-release.test.mjs tests/bundled-task-results.test.mjs tests/bundled-shell-cleanup.test.mjs && node --test --test-concurrency=1 tests/bundled-startup-recovery.test.mjs tests/bundled-shared-profile-recovery.test.mjs",
|
|
125
125
|
"test:host-cutover": "node --test tests/runtime-owner-historical.test.mjs tests/unified-runtime-release.test.mjs",
|
|
126
126
|
"test:host-upgrade": "node --test tests/bundled-historical-host-upgrade.test.mjs",
|
|
127
127
|
"test:native": "node scripts/test-native.mjs",
|
|
@@ -257,6 +257,7 @@
|
|
|
257
257
|
"dist/static-text.json",
|
|
258
258
|
"dist/runtime-daemon-schema.json",
|
|
259
259
|
"dist/windows-native-scripts.json",
|
|
260
|
+
"dist/windows-effect-job-programs.json",
|
|
260
261
|
"dist/generated-config-templates.json",
|
|
261
262
|
"dist/semantic-worker.js",
|
|
262
263
|
"dist/constructed-handler-worker.js",
|
package/public_docs/README.md
CHANGED
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
Documentation for KodaX users, product-client integrators and trusted Host developers.
|
|
4
4
|
|
|
5
5
|
This development tree implements the unified Product Client contract under
|
|
6
|
-
FEATURE_298/299/301. The package version is `0.7.97-beta.
|
|
7
|
-
`v0.7.96` remains the last stable release. `v0.7.97-beta.
|
|
6
|
+
FEATURE_298/299/301. The package version is `0.7.97-beta.3`;
|
|
7
|
+
`v0.7.96` remains the last stable release. `v0.7.97-beta.3` repairs
|
|
8
|
+
long-context recovery (bounded reads, adaptive compaction budgets and strict
|
|
9
|
+
complete-summary parsing), durable independent Actor settlement, the
|
|
10
|
+
first-Run work-mode lock and saved Session history (`productHistoryLocation`
|
|
11
|
+
and `productHistoryTurnResolution`), with verified interrupted-exit recovery
|
|
12
|
+
and DOCX/LibreOffice evidence; `v0.7.97-beta.2` hardens Script
|
|
8
13
|
execution reliability (collision-safe VM call paths with typed program data,
|
|
9
14
|
native tool-name wire fidelity, optional sourceContent and on-demand
|
|
10
15
|
outputSchema, missing-Node-global contextual guidance) with shared Host
|
|
@@ -38,7 +43,9 @@ estimated-token streaming progress shipped in `v0.7.97-alpha.11`; the unified
|
|
|
38
43
|
Host cutover and provider/OAuth credential parity shipped in
|
|
39
44
|
`v0.7.97-alpha.12`; the Space execution and session seams completed in
|
|
40
45
|
`v0.7.97-beta.1`; Script execution reliability hardening and shared Host
|
|
41
|
-
recovery fixes shipped in `v0.7.97-beta.2
|
|
46
|
+
recovery fixes shipped in `v0.7.97-beta.2`; long-context recovery, durable
|
|
47
|
+
Actor settlement and saved-history location/turn resolution shipped in
|
|
48
|
+
`v0.7.97-beta.3`. Read the
|
|
42
49
|
[current SDK alignment](sdk/embedder-guide.md#post-alpha10-sdk-alignment)
|
|
43
50
|
and [unified Host cutover](sdk/embedder-guide.md#unified-host-sdk-cutover-shipped-in-v0797-alpha12)
|
|
44
51
|
for compatibility and standalone-library boundaries. Historical first-read
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# KodaX SDK — Product Client and Host Integration
|
|
2
2
|
|
|
3
3
|
This page describes the current FEATURE_298/299/301 development tree, checked against
|
|
4
|
-
package version `0.7.97-beta.
|
|
4
|
+
package version `0.7.97-beta.3`. The version alone does not claim that all current
|
|
5
5
|
working-tree changes are already published to npm. Check the installed
|
|
6
6
|
package exports and the connected Host's capabilities when migrating.
|
|
7
7
|
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Ba as d,Ca as e,Da as f,Fb as k,_a as g,ab as h,xb as i,yb as j}from"./chunk-D36OIMV7.js";import"./chunk-BBZWF2EA.js";import"./chunk-F6GJXQNA.js";import"./chunk-XDMNJW6J.js";import"./chunk-RYBUYHDL.js";import"./chunk-4Y6U7AH4.js";import{a as c}from"./chunk-EPK6EWRI.js";import"./chunk-ISLK6R2P.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-W2CWO4PQ.js";import"./chunk-TQ475LOI.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import{Lb as a,Mb as b}from"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.js";export{e as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,f as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,c as emitResilienceDebug,d as estimateProviderPayloadBytes,k as runKodaX,j as saveRequiredSessionSnapshot,i as saveSessionSnapshot,a as validateAndFixToolHistory};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{a,b}from"./chunk-DV5YPYLW.js";import"./chunk-XDMNJW6J.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.js";export{b as createCodingWorkflowBackend,a as resumeWorkflowGenerationTurn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{ab as a,bb as b}from"./chunk-MCDZNQWD.js";import"./chunk-ZQYWDI4O.js";import"./chunk-EISRVOBJ.js";import"./chunk-DCE7XQUG.js";import"./chunk-QSZCR5GC.js";import"./chunk-V2XJSFFE.js";import"./chunk-JAF2YLZO.js";import"./chunk-DV5YPYLW.js";import"./chunk-X5M7TLJV.js";import"./chunk-C6JGLEYD.js";import"./chunk-D36OIMV7.js";import"./chunk-BBZWF2EA.js";import"./chunk-F6GJXQNA.js";import"./chunk-XDMNJW6J.js";import"./chunk-RYBUYHDL.js";import"./chunk-4Y6U7AH4.js";import"./chunk-EPK6EWRI.js";import"./chunk-ISLK6R2P.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-W2CWO4PQ.js";import"./chunk-TQ475LOI.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|