@nextclaw/kernel 0.19.8 → 0.19.9

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.
Files changed (19) hide show
  1. package/dist/app/worker/index.d.ts +1 -1
  2. package/dist/app/worker/index.js +2 -2
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +5 -5
  5. package/dist/{ncp-agent-session-journal-entry.utils-oYJG8jpX.js → ncp-agent-session-journal-entry.utils-BmQvCIr4.js} +2 -2
  6. package/dist/{ncp-agent-session-journal-entry.utils-oYJG8jpX.js.map → ncp-agent-session-journal-entry.utils-BmQvCIr4.js.map} +1 -1
  7. package/dist/{ncp-agent-session-journal.utils-CkymaYrF.js → ncp-agent-session-journal.utils-DPKiIDII.js} +12 -5
  8. package/dist/ncp-agent-session-journal.utils-DPKiIDII.js.map +1 -0
  9. package/dist/{ncp-agent-session-message-projection-tail.store-_7hsonM_.js → ncp-agent-session-message-projection-tail.store-Cne7-WRQ.js} +3 -3
  10. package/dist/{ncp-agent-session-message-projection-tail.store-_7hsonM_.js.map → ncp-agent-session-message-projection-tail.store-Cne7-WRQ.js.map} +1 -1
  11. package/dist/{nextclaw-harness.manager-CBcr8T_o.d.ts → nextclaw-harness.manager-BDFxf9mf.d.ts} +2 -2
  12. package/dist/{nextclaw-harness.manager-CBcr8T_o.d.ts.map → nextclaw-harness.manager-BDFxf9mf.d.ts.map} +1 -1
  13. package/dist/{nextclaw-harness.manager-DIL9tOd-.js → nextclaw-harness.manager-CjDdaCHx.js} +20 -15
  14. package/dist/nextclaw-harness.manager-CjDdaCHx.js.map +1 -0
  15. package/dist/{session-journal-maintenance.store-QClRvlO_.js → session-journal-maintenance.store-CizXaviA.js} +3 -3
  16. package/dist/{session-journal-maintenance.store-QClRvlO_.js.map → session-journal-maintenance.store-CizXaviA.js.map} +1 -1
  17. package/package.json +8 -8
  18. package/dist/ncp-agent-session-journal.utils-CkymaYrF.js.map +0 -1
  19. package/dist/nextclaw-harness.manager-DIL9tOd-.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { $ as renderSystemExecutionPolicy, $c as ContextProviderRequest, A as ProviderCatalogPlugin, C as NextclawRunStatus, D as NextclawTaskResult, E as NextclawTaskInput, Fd as NcpAgentSessionJournalReplayEvent, Fn as Contribution, G as appendCurrentTimeContextTail, Hc as createQuestionResolutionMessage, Id as createNcpAgentSessionSummary, J as createShowContentTools, K as serializeModelInputTail, Ld as SessionEventReplayer, M as AgentKernelModule, N as AgentKernelResources, Nd as UnfinishedNcpAgentRun, O as NextclawUserQuestion, P as AgentPlatform, Pd as applyNcpAgentRunLifecycleEvent, Q as renderAgentSafetyContext, Qc as ContextProvider, Rd as AgentManager, S as NextclawHarnessResources, Sd as SessionPersistence, Su as SessionManagerOptions, T as NextclawSessionRunInput, Uc as projectUserQuestions, Vc as createQuestionMessage, X as renderAgentBootstrapContext, Xc as AgentRuntimeSessionTypeCatalog, Xl as CompactionSummaryProvider, Y as BootstrapContextInput, Z as truncateContextText, Zc as ContextBlock, _ as NextclawAgentDefinition, _d as SessionMessageCursorError, a as INextclawAgentSessions, aa as createWorkspaceByteTools, al as IToolRegistry, at as SqliteDatabase, b as NextclawHarnessErrorCode, c as INextclawRun, ca as WorkspaceEntry, d as LLMResponse, da as WorkspaceWrite, el as IContextRegistry, f as LLMStreamEvent, fu as AgentRuntimeEntry, g as McpToolCatalogEntry, gu as AgentRuntimeSessionTypeOption, h as McpServerRecord, i as INextclawAgentRegistry, il as IRuntimeRegistry, it as SessionMessageSqlProjectionStore, j as ProviderSpec, k as NextclawUserQuestionReply, l as INextclawSession, la as WorkspaceList, m as McpServerDefinition, md as SessionHistoryPreparation, mu as AgentRuntimeSessionTypeDescribeParams, n as Disposer, nl as IMcpRegistry, nt as sessionJsonChunks, o as INextclawContributionRegistry, ol as McpToolCallInput, p as McpCatalogFilter, pu as AgentRuntimeProviderRegistration, q as composeAgentToolCatalog, r as INextclawAgent, rl as IModelRegistry, rt as SessionMessagePreparationStore, s as INextclawHarness, sa as WorkspaceByteStore, sl as ModelChatInput, t as NextclawHarness, tl as IKernel, u as INextclawSessionRegistry, ua as WorkspaceRead, v as NextclawContributionDescriptor, vd as SessionMessagePage, w as NextclawSessionCreateInput, x as NextclawHarnessOptions, xu as SessionManager, y as NextclawHarnessError, yd as SessionMessagePart, zd as AgentProfilePersistence } from "../../nextclaw-harness.manager-CBcr8T_o.js";
1
+ import { $ as renderSystemExecutionPolicy, $c as ContextProviderRequest, A as ProviderCatalogPlugin, C as NextclawRunStatus, D as NextclawTaskResult, E as NextclawTaskInput, Fd as NcpAgentSessionJournalReplayEvent, Fn as Contribution, G as appendCurrentTimeContextTail, Hc as createQuestionResolutionMessage, Id as createNcpAgentSessionSummary, J as createShowContentTools, K as serializeModelInputTail, Ld as SessionEventReplayer, M as AgentKernelModule, N as AgentKernelResources, Nd as UnfinishedNcpAgentRun, O as NextclawUserQuestion, P as AgentPlatform, Pd as applyNcpAgentRunLifecycleEvent, Q as renderAgentSafetyContext, Qc as ContextProvider, Rd as AgentManager, S as NextclawHarnessResources, Sd as SessionPersistence, Su as SessionManagerOptions, T as NextclawSessionRunInput, Uc as projectUserQuestions, Vc as createQuestionMessage, X as renderAgentBootstrapContext, Xc as AgentRuntimeSessionTypeCatalog, Xl as CompactionSummaryProvider, Y as BootstrapContextInput, Z as truncateContextText, Zc as ContextBlock, _ as NextclawAgentDefinition, _d as SessionMessageCursorError, a as INextclawAgentSessions, aa as createWorkspaceByteTools, al as IToolRegistry, at as SqliteDatabase, b as NextclawHarnessErrorCode, c as INextclawRun, ca as WorkspaceEntry, d as LLMResponse, da as WorkspaceWrite, el as IContextRegistry, f as LLMStreamEvent, fu as AgentRuntimeEntry, g as McpToolCatalogEntry, gu as AgentRuntimeSessionTypeOption, h as McpServerRecord, i as INextclawAgentRegistry, il as IRuntimeRegistry, it as SessionMessageSqlProjectionStore, j as ProviderSpec, k as NextclawUserQuestionReply, l as INextclawSession, la as WorkspaceList, m as McpServerDefinition, md as SessionHistoryPreparation, mu as AgentRuntimeSessionTypeDescribeParams, n as Disposer, nl as IMcpRegistry, nt as sessionJsonChunks, o as INextclawContributionRegistry, ol as McpToolCallInput, p as McpCatalogFilter, pu as AgentRuntimeProviderRegistration, q as composeAgentToolCatalog, r as INextclawAgent, rl as IModelRegistry, rt as SessionMessagePreparationStore, s as INextclawHarness, sa as WorkspaceByteStore, sl as ModelChatInput, t as NextclawHarness, tl as IKernel, u as INextclawSessionRegistry, ua as WorkspaceRead, v as NextclawContributionDescriptor, vd as SessionMessagePage, w as NextclawSessionCreateInput, x as NextclawHarnessOptions, xu as SessionManager, y as NextclawHarnessError, yd as SessionMessagePart, zd as AgentProfilePersistence } from "../../nextclaw-harness.manager-BDFxf9mf.js";
2
2
  import { AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, EventBus, EventBusOptions, Ingress, IngressContext, IngressEnvelope, IngressHandler, Key, TypedKey, Unsubscribe, createTypedKey, eventKeys, ingressKeys } from "@nextclaw/shared";
3
3
  import { NcpEndpointEvent, NcpMessage, NcpTool } from "@nextclaw/ncp";
4
4
  export { type AgentKernelModule, type AgentKernelResources, AgentManager, type AgentPlatform, type AgentProfilePersistence, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, type AgentRuntimeSessionTypeOption, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type BootstrapContextInput, type CompactionSummaryProvider, type ContextBlock, type ContextProvider, type ContextProviderRequest, Contribution, type Disposer, EventBus, type EventBusOptions, type IContextRegistry, type IKernel, type IMcpRegistry, type IModelRegistry, type INextclawAgent, type INextclawAgentRegistry, type INextclawAgentSessions, type INextclawContributionRegistry, type INextclawHarness, type INextclawRun, type INextclawSession, type INextclawSessionRegistry, type IRuntimeRegistry, type IToolRegistry, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, type Key, type LLMResponse, type LLMStreamEvent, type McpCatalogFilter, type McpServerDefinition, type McpServerRecord, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, type NcpAgentSessionJournalReplayEvent, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, type NextclawHarnessResources, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, type NextclawUserQuestion, type NextclawUserQuestionReply, type ProviderCatalogPlugin, type ProviderSpec, SessionEventReplayer, type SessionHistoryPreparation, SessionManager, type SessionManagerOptions, SessionMessageCursorError, type SessionMessagePage, type SessionMessagePart, SessionMessagePreparationStore, SessionMessageSqlProjectionStore, type SessionPersistence, type SqliteDatabase, type TypedKey, type UnfinishedNcpAgentRun, type Unsubscribe, WorkspaceByteStore, WorkspaceEntry, WorkspaceList, WorkspaceRead, WorkspaceWrite, appendCurrentTimeContextTail, applyNcpAgentRunLifecycleEvent, composeAgentToolCatalog, createNcpAgentSessionSummary, createQuestionMessage, createQuestionResolutionMessage, createShowContentTools, createTypedKey, createWorkspaceByteTools, eventKeys, ingressKeys, projectUserQuestions, renderAgentBootstrapContext, renderAgentSafetyContext, renderSystemExecutionPolicy, serializeModelInputTail, sessionJsonChunks, truncateContextText };
@@ -1,4 +1,4 @@
1
- import { $ as SessionMessageSqlProjectionStore, K as appendCurrentTimeContextTail, L as renderAgentBootstrapContext, N as renderAgentSafetyContext, P as renderSystemExecutionPolicy, Q as SessionMessagePreparationStore, R as truncateContextText, S as AgentManager, _ as createQuestionMessage, b as SessionManager, c as Contribution, l as NextclawHarnessError, nt as SessionMessageCursorError, ot as applyNcpAgentRunLifecycleEvent, q as serializeModelInputTail, t as NextclawHarness, tt as sessionJsonChunks, v as createQuestionResolutionMessage, w as createShowContentTools, x as createWorkspaceByteTools, y as projectUserQuestions } from "../../nextclaw-harness.manager-DIL9tOd-.js";
2
- import { Z as composeAgentToolCatalog, m as SessionEventReplayer, s as createNcpAgentSessionSummary } from "../../ncp-agent-session-journal.utils-CkymaYrF.js";
1
+ import { $ as SessionMessageSqlProjectionStore, K as appendCurrentTimeContextTail, L as renderAgentBootstrapContext, N as renderAgentSafetyContext, P as renderSystemExecutionPolicy, Q as SessionMessagePreparationStore, R as truncateContextText, S as AgentManager, _ as createQuestionMessage, b as SessionManager, c as Contribution, l as NextclawHarnessError, nt as SessionMessageCursorError, ot as applyNcpAgentRunLifecycleEvent, q as serializeModelInputTail, t as NextclawHarness, tt as sessionJsonChunks, v as createQuestionResolutionMessage, w as createShowContentTools, x as createWorkspaceByteTools, y as projectUserQuestions } from "../../nextclaw-harness.manager-CjDdaCHx.js";
2
+ import { Z as composeAgentToolCatalog, m as SessionEventReplayer, s as createNcpAgentSessionSummary } from "../../ncp-agent-session-journal.utils-DPKiIDII.js";
3
3
  import { EventBus, Ingress, createTypedKey, eventKeys, ingressKeys } from "@nextclaw/shared";
4
4
  export { AgentManager, Contribution, EventBus, Ingress, NextclawHarness, NextclawHarnessError, SessionEventReplayer, SessionManager, SessionMessageCursorError, SessionMessagePreparationStore, SessionMessageSqlProjectionStore, appendCurrentTimeContextTail, applyNcpAgentRunLifecycleEvent, composeAgentToolCatalog, createNcpAgentSessionSummary, createQuestionMessage, createQuestionResolutionMessage, createShowContentTools, createTypedKey, createWorkspaceByteTools, eventKeys, ingressKeys, projectUserQuestions, renderAgentBootstrapContext, renderAgentSafetyContext, renderSystemExecutionPolicy, serializeModelInputTail, sessionJsonChunks, truncateContextText };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as renderSystemExecutionPolicy, $a as PanelAppAgentGenerateObjectInput, $c as ContextProviderRequest, $i as InboxDeliveryError, $l as ProductActivitySignal, $n as NARP_HTTP_RUNTIME_KIND, $o as AppPackageDependencyBindingInput, $r as PortableRuntimeAcceptanceEvidenceSource, $s as ServiceAppManifest, $t as PortableRuntimeAcceptanceManager, $u as ProjectErrorCode, A as ProviderCatalogPlugin, Aa as DESKTOP_HOST_PROTOCOL_VERSION, Ac as dispatchAgentRuntimeSessionRequest, Ad as SessionPendingInput, Ai as LlmUsageStoreOptions, Al as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, An as TypedKey, Ao as CapabilityGrantFilter, Ar as VerificationRecordService, As as ServiceActionCaller, At as ObservationCapabilityDescriptor, Au as CreateProjectWorkItemInput, B as LocalizedTextMap, Ba as DesktopHostRequest, Bc as UserQuestionView, Bd as ResolvedAgentProfile, Bi as SessionContextCompactionErrorCode, Bl as readContextWindowEventSessionId, Bn as dispatchPromptOverNcpResult, Bo as AppDataLifecycle, Br as VerificationEvidenceRecord, Bs as ServiceAppCapabilityProvision, Bt as DEFAULT_SERVICE_ACTION_RISK, Bu as ProjectWorkArtifactLink, C as NextclawRunStatus, Ca as DesktopNodeReplService, Cc as AccessSessionState, Cd as SessionSettingsError, Ci as PanelAppManager, Cl as CONTEXT_COMPACTION_PROJECTION_KIND, Cn as IngressContext, Co as CapabilityGrantStore, Cr as ServiceAppDeleteResult, Cs as AppPackageUninstallRollback, Ct as ContextBinding, Cu as ProjectWorkError, D as NextclawTaskResult, Da as UnavailableDesktopHost, Dc as buildSessionRequestCompletionMessage, Dd as SessionTokenUsageTotals, Di as LlmUsageManagerOptions, Dl as CONTEXT_COMPACTION_TIMELINE_KIND, Dn as NcpEndpointEvent, Do as CapabilityGrantRevocationListener, Dr as ServiceAppErrorCode, Ds as AgentServiceActionCaller, Dt as EventSubscriptionBudget, Du as ProjectAgreementMaterial, E as NextclawTaskInput, Ea as DesktopHostEventListener, Ec as AgentRuntimeSessionRequestDispatcherOptions, Ed as SessionTokenUsageSummary, Ei as LlmUsageManager, El as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, En as Key, Eo as CapabilityGrantManager, Er as ServiceAppError, Es as isAppPackageError, Et as EventSubscription, Eu as ProjectMaterialService, F as NextclawKernel, Fa as DesktopHostCaller, Fc as UserQuestionManager, Fd as NcpAgentSessionJournalReplayEvent, Fi as createLlmUsageRecord, Fl as isContextCompactionProjectionMessage, Fn as Contribution, Fo as AppDataDeleteResult, Fr as PortableRuntimeAcceptanceResultStatus, Fs as ServiceActionInvokeRequest, Ft as ObservationRelationshipStatus, Fu as ProjectRecentArtifactPage, G as appendCurrentTimeContextTail, Ga as createPanelAppClientGrantRequest, Gc as AgentRunReply, Gi as SystemObjectReferenceErrorCode, Gl as ContextCompactionPreflightBeginResult, Gn as resolveChannelReplyRoute, Go as AppDocumentGrantMutationResult, Gr as VerificationRecordList, Gs as ServiceAppJobEvent, Gt as SERVICE_APP_MANIFEST_FILE_NAME, Gu as ProjectWorkItemPage, H as buildLocalizedTextMap, Ha as DesktopHostStatus, Hc as createQuestionResolutionMessage, Hi as SessionContextCompactionResult, Hl as shouldRefreshContextWindowDuringStream, Hn as ChannelReplyRouterDispatchParams, Ho as AppDataSource, Hr as VerificationRecordEntrySurface, Hs as ServiceAppExternalRemediation, Ht as getServiceActionName, Hu as ProjectWorkItem, I as NextclawKernelOptions, Ia as DesktopHostCapabilityDeclaration, Ic as UserQuestionReplyResolution, Id as createNcpAgentSessionSummary, Ii as hasLlmUsageTelemetry, Il as isContextCompactionTimelineMessage, In as DirectPromptDispatchExecution, Io as AppDataDiagnostic, Ir as evaluatePortableRuntimeAcceptance, Is as ServiceActionInvokeResult, It as ObservationState, Iu as ProjectWorkActivity, J as createShowContentTools, Ja as createServiceAppModelSlotGrantRequest, Jc as NodePlatform, Ji as SystemObjectReferenceSnapshotSource, Jl as ContextCompactionTrigger, Jn as runGatewayInboundLoop, Jo as AppPackageComponentSource, Jr as VerificationRecordStatus, Js as ServiceAppJobStatus, Jt as readServiceAppManifest, Ju as ProjectWorkStateCategory, K as serializeModelInputTail, Ka as createServiceActionGrantRequest, Kc as AgentRunReplyOptions, Ki as SystemObjectReferenceManager, Kl as ContextCompactionPreflightResult, Kn as GatewayInboundLoopRuntime, Ko as AppInstalledPermissionState, Kr as VerificationRecordObservation, Ks as ServiceAppJobList, Kt as getServiceAppManifestPath, Ku as ProjectWorkListInput, L as ExtensionLoadProgress, La as DesktopHostEvent, Lc as UserQuestionResolution, Ld as SessionEventReplayer, Li as normalizeLlmUsageModel, Ll as isContextWindowSnapshot, Ln as DirectPromptDispatchParams, Lo as AppDataEntry, Lr as evaluatePortableRuntimeAcceptanceArtifact, Ls as ServiceActionRisk, Lt as ObservationTarget, Lu as ProjectWorkActivityPage, M as AgentKernelModule, Ma as DesktopCapabilityError, Mc as SessionRequestManager, Md as SessionSteerQueuedInputResult, Mi as LlmUsageSnapshot, Ml as buildContextCompactionTimelineNcpMessage, Mn as createTypedKey, Mo as CapabilityGrantResource, Mr as PortableRuntimeAcceptanceEvidence, Ms as ServiceActionGrantRequest, Mt as ObservationEvent, Mu as PROJECT_WORK_ATTENTION_VALUES, N as AgentKernelResources, Na as DesktopCapabilityErrorCode, Nc as SessionRequestManagerOptions, Nd as UnfinishedNcpAgentRun, Ni as LlmUsageSummary, Nl as createContextCompactionMessageId, Nn as eventKeys, No as CapabilityGrantSubject, Nr as PortableRuntimeAcceptanceEvidenceArtifact, Ns as ServiceActionGrantState, Nt as ObservationExtensionRuntime, Nu as PROJECT_WORK_STATE_CATEGORIES, O as NextclawUserQuestion, Oa as createDesktopHostError, Oc as createAgentRuntimeSessionRequestDispatcher, Od as isSessionMessageCursorError, Oi as LlmUsageStats, Ol as ContextCompactionModelProjection, On as NcpMessage, Oo as CapabilityGrant, Or as isServiceAppError, Os as PanelServiceActionCaller, Ot as JsonPointer, Ou as ProjectSkillMaterial, P as AgentPlatform, Pa as DesktopHostAccess, Pc as UserQuestionError, Pd as applyNcpAgentRunLifecycleEvent, Pi as buildLlmUsageSummary, Pl as createContextWindowSignature, Pn as ingressKeys, Po as AppDataManager, Pr as PortableRuntimeAcceptanceResult, Ps as ServiceActionInvocationFacts, Pt as ObservationRef, Pu as ProjectRecentArtifact, Q as renderAgentSafetyContext, Qa as PanelAppAgentCapability, Qc as ContextProvider, Qi as CreateInboxDeliveryInput, Ql as ProductActivityKind, Qn as BuiltinNarpRuntimeProviderService, Qo as AppPackageDependencyBinding, Qr as PortableRuntimeAcceptanceDefinition, Qs as ServiceAppLifecycle, Qt as PortableRuntimeAcceptanceDefinitionView, Qu as ProjectError, R as ExtensionLoadResult, Ra as DesktopHostManifest, Rc as USER_QUESTION_EXTENSION_TYPE, Rd as AgentManager, Ri as sanitizeLlmUsage, Rl as readContextCompactionCheckpoint, Rn as DirectPromptDispatchResult, Ro as AppDataError, Rr as parsePortableRuntimeAcceptanceEvidenceArtifact, Rs as ServiceActionRuntimeState, Rt as SubscribeEventsInput, Ru as ProjectWorkActivityType, S as NextclawHarnessResources, Sa as DesktopSnapshotOptions, Sc as AccessSessionRecord, Sd as SessionPersistence, Si as PreferenceJsonValue, Sl as CONTEXT_COMPACTION_PART_START, Sn as Ingress, So as normalizeCapabilityGrantRequest, Sr as NcpAgentSessionJournalStore, Ss as AppPackageUnavailableDiagnostic, St as BuildContextTailInput, Su as SessionManagerOptions, T as NextclawSessionRunInput, Ta as DesktopHost, Tc as NextclawApplicationOptions, Td as SessionTokenUsageStatus, Ti as McpManager, Tl as CONTEXT_COMPACTION_RECOVERY_PREAMBLE, Tn as IngressHandler, To as CapabilityGrantListener, Tr as ServiceAppManager, Ts as CapabilityProviderView, Tt as EventDelivery, Tu as isProjectWorkError, U as parseSkillFrontmatter, Ua as ResolvedDesktopApplicationTarget, Uc as projectUserQuestions, Ui as isSessionContextCompactionError, Ul as shouldRefreshContextWindowImmediately, Un as dispatchChannelReplyRoute, Uo as isAppDataError, Ur as VerificationRecordError, Us as ServiceAppJobCaller, Ut as listServiceAppManifestActions, Uu as ProjectWorkItemDetail, V as SkillFrontmatter, Va as DesktopHostResponse, Vc as createQuestionMessage, Vi as SessionContextCompactionManager, Vl as readLatestContextCompactionCheckpoint, Vn as startPromptOverNcpExecution, Vo as AppDataList, Vr as VerificationRecord, Vs as ServiceAppCapabilityRequirement, Vt as buildServiceActionId, Vu as ProjectWorkAttention, W as stripSkillFrontmatter, Wa as createPanelAppAgentGrantRequest, Wc as AgentRunClient, Wi as SystemObjectReferenceError, Wl as CompactionProfileResolver, Wn as isReplyCapableChannel, Wo as AppPackageManager, Wr as VerificationRecordInput, Ws as ServiceAppJobChunkEvent, Wt as mergeServiceAppRuntimeActions, Wu as ProjectWorkItemListEntry, X as renderAgentBootstrapContext, Xa as readServiceAppSlotTarget, Xc as AgentRuntimeSessionTypeCatalog, Xi as createInboxDeliverySystemObjectProvider, Xl as CompactionSummaryProvider, Xn as BuildAgentRunSendPayloadParams, Xo as AppPackageComponentView, Xr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, Xs as ServiceAppJobView, Xt as PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, Xu as UpdateProjectWorkItemInput, Y as BootstrapContextInput, Ya as readServiceActionTargetId, Yc as NodePlatformOptions, Yi as createCronJobSystemObjectProvider, Yl as COMPACTION_RECOVERY_NOTICE, Yn as AssetApi, Yo as AppPackageComponentSourceList, Yr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, Ys as ServiceAppJobTerminalEvent, Yt as CommandRegistry, Yu as ProjectWorkSummary, Z as truncateContextText, Za as PANEL_APP_AGENT_CAPABILITIES, Zc as ContextBlock, Zi as isSystemObjectReferenceError, Zl as ContextCompactionJournalRecoveryService, Zn as buildAgentRunSendPayload, Zo as AppPackageConflict, Zr as PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, Zs as ServiceAppJobWatch, Zt as PortableRuntimeAcceptanceContractView, Zu as UpdateProjectWorkStateInput, _ as NextclawAgentDefinition, _a as SkillInfo, _c as AccessManagerOptions, _d as SessionMessageCursorError, _i as PreferenceErrorCode, _l as NextclawNcpRunContextResolveParams, _n as AppEventEnvelope, _o as isPanelAppError, _r as assertSessionJournalTailComplete, _s as AppPackageReadinessStatus, _t as readJsonPointer, _u as AgentRuntimeSessionTypeProvider, a as INextclawAgentSessions, aa as createWorkspaceByteTools, ac as ServiceAppRequirements, ad as ProjectRecord, ai as ServiceAppResidentEventInboxService, al as IToolRegistry, an as PortableRuntimeAcceptanceIdentityService, ao as PanelAppAgentSendResult, ar as RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, as as AppPackageError, at as SqliteDatabase, au as ConfigMutationResult, b as NextclawHarnessErrorCode, ba as DesktopSessionCaller, bc as AccessPrincipal, bd as SessionMetadataUpdate, bi as isPreferenceError, bl as ProviderManagerNcpLLMApi, bn as EventBus, bo as getCapabilityGrantKey, br as recoverSessionJournalTornTail, bs as AppPackageSecretSlotView, bt as ObservationManagerOptions, bu as resolveAgentRuntimeEntries, c as INextclawRun, ca as WorkspaceEntry, cc as ServiceAppResidentEventStatus, cd as ProjectTemplateId, ci as ServiceAppJobEventSink, cl as NativeAgentRuntimeResources, cn as PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, co as PanelAppCapabilityGrantCaller, cr as RuntimeDistribution, cs as AppPackageList, ct as listExtensionChannelIds, cu as ProviderModelCatalogManager, d as LLMResponse, da as WorkspaceWrite, dc as ServiceAppRuntimeStatus, dd as ProviderModelsDiscoverInput, di as PortableRunnerObservation, dl as readMetadataThinking, dn as PortableRuntimeAcceptancePresentation, do as PanelAppDeleteResult, dr as resolveRuntimeInstanceSnapshot, ds as AppPackageOperationList, dt as assertObservationJsonValue, du as ConfigPersistence, ea as InboxDeliveryErrorCode, ec as ServiceAppManifestAction, ed as ProjectManager, ei as PortableRuntimeAcceptanceId, el as IContextRegistry, en as PortableRuntimeAcceptanceStatusEntry, eo as PanelAppAgentGenerateObjectRequest, er as NARP_STDIO_RUNTIME_KIND, es as AppPackageDependencyCandidate, et as getUiContentParamsBootstrapScript, eu as ProductActivitySink, f as LLMStreamEvent, fa as LocalAgentProfileStore, fc as ServiceAppTerminalJobStatus, fd as AgentRunSession, fi as PlannedRestartRecovery, fl as resolveEffectiveModel, fn as presentPortableRuntimeAcceptanceDefinition, fo as PanelAppEntry, fr as LearningLoopRuntimeConfig, fs as AppPackageOperationResult, ft as assertObservationPredicate, fu as AgentRuntimeEntry, g as McpToolCatalogEntry, ga as InstalledSkillsList, gc as AccessManager, gd as SessionListPageOptions, gi as PreferenceError, gl as NextclawNcpResolvedRunContext, gn as AppEventEmitOptions, go as isPanelAppAgentCapability, gr as SessionJournalCompactionResult, gs as AppPackageReadinessRequirement, gt as parseObservationDuration, gu as AgentRuntimeSessionTypeOption, h as McpServerRecord, ha as InstalledSkillSummary, hc as AutomationManagerOptions, hd as SessionListFilter, hi as PlannedRestartRecoveryTicket, hl as NextclawNcpResolvedAgentProfile, hn as PanelAppAssetTokenService, ho as PanelAppList, hr as ProductFeatureControls, hs as AppPackageReadiness, ht as matchesObservationPredicate, hu as AgentRuntimeSessionTypeIcon, i as INextclawAgentRegistry, ia as isInboxDeliveryError, ic as ServiceAppRecord, id as PROJECT_TEMPLATE_IDS, ii as ResidentEventInput, il as IRuntimeRegistry, in as PortableRuntimeAcceptanceIdentityResult, io as PanelAppAgentSendRequest, ir as RUNTIME_INSTANCE_DISTRIBUTION_ENV, is as AppPackageDependencyView, it as SessionMessageSqlProjectionStore, iu as ConfigManagerRuntimeHooks, j as ProviderSpec, ja as DesktopApplicationTarget, jc as waitForAgentRuntimeSessionReply, jd as SessionQueuedInput, ji as LlmUsageRecord, jl as buildContextCompactionModelProjection, jn as Unsubscribe, jo as CapabilityGrantRequest, jr as PortableRuntimeAcceptanceEvaluationContext, js as ServiceActionGrant, jt as ObservationContextTail, ju as CreateProjectWorkStateInput, k as NextclawUserQuestionReply, ka as DESKTOP_HOST_ACCESS, kc as createAgentRuntimeSessionRequestSourceNotifier, kd as isSessionSettingsError, ki as LlmUsageStore, kl as ContextCompactionTimelineCheckpoint, kn as NcpTool, ko as CapabilityGrantDecision, kr as WorkspaceServiceDataOwner, ks as ServiceAction, kt as JsonValue, ku as ProjectWorkManager, l as INextclawSession, la as WorkspaceList, lc as ServiceAppResidentEventView, ld as LlmProviderManager, li as ServiceAppJobJournalService, ll as normalizeOptionalString, ln as PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, lo as PanelAppClientGrant, lr as RuntimeInstallationKind, ls as AppPackageOperationAction, lt as ExtensionRuntimeStatus, lu as ProviderModelCatalogSnapshot, m as McpServerDefinition, ma as InstalledSkillDetail, mc as AutomationManager, md as SessionHistoryPreparation, mi as PlannedRestartRecoveryResult, ml as syncSessionThinkingPreference, mn as McpServiceAppRuntimeService, mo as PanelAppErrorCode, mr as FeatureControlsService, ms as AppPackageOperationView, mt as evaluateObservationEventAdmission, mu as AgentRuntimeSessionTypeDescribeParams, n as Disposer, na as InboxDeliveryManagerOptions, nc as ServiceAppProtocol, nd as isProjectError, ni as ServiceAppRuntimeService, nl as IMcpRegistry, nn as PortableRuntimeAcceptanceSurfaceResult, no as PanelAppAgentRunClient, nr as RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, ns as AppPackageDependencyDiagnostic, nt as sessionJsonChunks, nu as ConfigManager, o as INextclawContributionRegistry, oa as LocalWorkspaceStore, oc as ServiceAppResidentEventDisposition, od as ProjectSessionBinding, oi as ServiceAppResidentEventScope, ol as McpToolCallInput, on as PortableRuntimeAcceptanceUnavailableIdentity, oo as PanelAppBridgeSession, or as RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, os as AppPackageErrorCode, ot as resolveLegacyEventType, ou as PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, p as McpCatalogFilter, pa as LocalConfigStore, pc as ServiceAppWitContract, pd as CreateAgentRunSessionParams, pi as PlannedRestartRecoveryManager, pl as resolveSessionChannelContext, pn as resolvePortableRuntimeAcceptanceLocale, po as PanelAppError, pr as readLearningLoopRuntimeConfig, ps as AppPackageOperationStatus, pt as buildObservationEventModelMessage, pu as AgentRuntimeProviderRegistration, q as composeAgentToolCatalog, qa as createServiceAppAgentSlotGrantRequest, qc as AgentRunStreamOptions, qi as SystemObjectReferenceProvider, ql as ContextCompactionPreflightService, qn as GatewayInboundProcessor, qo as AppPackageComponentKind, qr as VerificationRecordRole, qs as ServiceAppJobProgressEvent, qt as parseServiceAppManifest, qu as ProjectWorkState, r as INextclawAgent, ra as MAX_INBOX_DELIVERY_CONTENT_LENGTH, rc as ServiceAppProvides, rd as CreateProjectInput, ri as LeasedResidentEvent, rl as IModelRegistry, rn as PortableRuntimeAcceptanceIdentity, ro as PanelAppAgentSendPayload, rr as RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, rs as AppPackageDependencyDiagnosticCode, rt as SessionMessagePreparationStore, ru as ConfigManagerOptions, s as INextclawHarness, sa as WorkspaceByteStore, sc as ServiceAppResidentEventList, sd as ProjectTemplate, si as ServiceAppAiCapabilityService, sl as ModelChatInput, sn as normalizePortableRuntimeEnvironment, so as PanelAppCapabilityGrant, sr as ResolveRuntimeInstanceSnapshotParams, ss as AppPackageHostTarget, st as toNcpMessages, su as ProviderModelCatalogEntry, t as NextclawHarness, ta as InboxDeliveryManager, tc as ServiceAppModelCapabilitySlot, td as ProjectManagerOptions, ti as PortableRuntimeAcceptancePlatform, tl as IKernel, tn as PortableRuntimeAcceptanceStatusView, to as PanelAppAgentGenerateObjectResult, tr as DEFAULT_AGENT_RUNTIME_ENTRY_ID, ts as AppPackageDependencyCycle, tt as injectUiContentParamsBootstrap, tu as ProductActivitySource, u as INextclawSessionRegistry, ua as WorkspaceRead, uc as ServiceAppResourceRequirement, ud as LlmProviderRuntime, ui as ServiceAppJobScope, ul as readMetadataModel, un as PortableRuntimeAcceptanceLocale, uo as PanelAppContent, ur as RuntimeInstanceSnapshot, us as AppPackageOperationInput, ut as ObservationEventAdmissionDecision, uu as ChannelManager, v as NextclawContributionDescriptor, va as SkillManager, vc as AccessLoginResult, vd as SessionMessagePage, vi as PreferenceManager, vl as buildNextclawNcpRunContext, vn as AppEventHandler, vo as capabilityGrantCovers, vr as compactSessionJournal, vs as AppPackageRuntimeHooks, vt as toBoundedJson, vu as describeAgentRuntimeSessionTypes, w as NextclawSessionCreateInput, wa as DesktopHostCapabilityManager, wc as LocalProduct, wd as SessionSettingsPatch, wi as PanelAppPreferencesUpdate, wl as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, wn as IngressEnvelope, wo as CapabilityGrantLegacyMigrationService, wr as ServiceAppList, ws as AppPackageView, wt as EventAdmissionPolicy, wu as ProjectWorkErrorCode, x as NextclawHarnessOptions, xa as DesktopSessionStateService, xc as AccessRole, xd as SessionModelTokenUsage, xi as PreferenceEntry, xl as CONTEXT_COMPACTION_CONTINUATION_TEXT, xn as EventBusOptions, xo as matchesCapabilityGrantFilter, xr as restoreSessionJournalBackup, xs as AppPackageSecretStatus, xt as BindContextInput, xu as SessionManager, y as NextclawHarnessError, ya as SkillScope, yc as AccessPasswordStatus, yd as SessionMessagePart, yi as PreferenceManagerOptions, yl as createAssetTools, yn as AppEventKey, yo as createCapabilityDeclarationFingerprint, yr as recoverSessionJournalMaintenance, ys as AppPackageSecretReadiness, yt as ObservationManager, yu as normalizeAgentRuntimeSessionTypeIcon, z as ExtensionManager, za as DesktopHostMethod, zc as UserQuestionPrompt, zd as AgentProfilePersistence, zi as SessionContextCompactionError, zl as readContextRecoveryState, zn as dispatchPromptOverNcp, zo as AppDataErrorCode, zr as LegacyVerificationRecord, zs as ServiceAppAgentCapabilitySlot, zt as TypedPredicate, zu as ProjectWorkActor } from "./nextclaw-harness.manager-CBcr8T_o.js";
1
+ import { $ as renderSystemExecutionPolicy, $a as PanelAppAgentGenerateObjectInput, $c as ContextProviderRequest, $i as InboxDeliveryError, $l as ProductActivitySignal, $n as NARP_HTTP_RUNTIME_KIND, $o as AppPackageDependencyBindingInput, $r as PortableRuntimeAcceptanceEvidenceSource, $s as ServiceAppManifest, $t as PortableRuntimeAcceptanceManager, $u as ProjectErrorCode, A as ProviderCatalogPlugin, Aa as DESKTOP_HOST_PROTOCOL_VERSION, Ac as dispatchAgentRuntimeSessionRequest, Ad as SessionPendingInput, Ai as LlmUsageStoreOptions, Al as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, An as TypedKey, Ao as CapabilityGrantFilter, Ar as VerificationRecordService, As as ServiceActionCaller, At as ObservationCapabilityDescriptor, Au as CreateProjectWorkItemInput, B as LocalizedTextMap, Ba as DesktopHostRequest, Bc as UserQuestionView, Bd as ResolvedAgentProfile, Bi as SessionContextCompactionErrorCode, Bl as readContextWindowEventSessionId, Bn as dispatchPromptOverNcpResult, Bo as AppDataLifecycle, Br as VerificationEvidenceRecord, Bs as ServiceAppCapabilityProvision, Bt as DEFAULT_SERVICE_ACTION_RISK, Bu as ProjectWorkArtifactLink, C as NextclawRunStatus, Ca as DesktopNodeReplService, Cc as AccessSessionState, Cd as SessionSettingsError, Ci as PanelAppManager, Cl as CONTEXT_COMPACTION_PROJECTION_KIND, Cn as IngressContext, Co as CapabilityGrantStore, Cr as ServiceAppDeleteResult, Cs as AppPackageUninstallRollback, Ct as ContextBinding, Cu as ProjectWorkError, D as NextclawTaskResult, Da as UnavailableDesktopHost, Dc as buildSessionRequestCompletionMessage, Dd as SessionTokenUsageTotals, Di as LlmUsageManagerOptions, Dl as CONTEXT_COMPACTION_TIMELINE_KIND, Dn as NcpEndpointEvent, Do as CapabilityGrantRevocationListener, Dr as ServiceAppErrorCode, Ds as AgentServiceActionCaller, Dt as EventSubscriptionBudget, Du as ProjectAgreementMaterial, E as NextclawTaskInput, Ea as DesktopHostEventListener, Ec as AgentRuntimeSessionRequestDispatcherOptions, Ed as SessionTokenUsageSummary, Ei as LlmUsageManager, El as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, En as Key, Eo as CapabilityGrantManager, Er as ServiceAppError, Es as isAppPackageError, Et as EventSubscription, Eu as ProjectMaterialService, F as NextclawKernel, Fa as DesktopHostCaller, Fc as UserQuestionManager, Fd as NcpAgentSessionJournalReplayEvent, Fi as createLlmUsageRecord, Fl as isContextCompactionProjectionMessage, Fn as Contribution, Fo as AppDataDeleteResult, Fr as PortableRuntimeAcceptanceResultStatus, Fs as ServiceActionInvokeRequest, Ft as ObservationRelationshipStatus, Fu as ProjectRecentArtifactPage, G as appendCurrentTimeContextTail, Ga as createPanelAppClientGrantRequest, Gc as AgentRunReply, Gi as SystemObjectReferenceErrorCode, Gl as ContextCompactionPreflightBeginResult, Gn as resolveChannelReplyRoute, Go as AppDocumentGrantMutationResult, Gr as VerificationRecordList, Gs as ServiceAppJobEvent, Gt as SERVICE_APP_MANIFEST_FILE_NAME, Gu as ProjectWorkItemPage, H as buildLocalizedTextMap, Ha as DesktopHostStatus, Hc as createQuestionResolutionMessage, Hi as SessionContextCompactionResult, Hl as shouldRefreshContextWindowDuringStream, Hn as ChannelReplyRouterDispatchParams, Ho as AppDataSource, Hr as VerificationRecordEntrySurface, Hs as ServiceAppExternalRemediation, Ht as getServiceActionName, Hu as ProjectWorkItem, I as NextclawKernelOptions, Ia as DesktopHostCapabilityDeclaration, Ic as UserQuestionReplyResolution, Id as createNcpAgentSessionSummary, Ii as hasLlmUsageTelemetry, Il as isContextCompactionTimelineMessage, In as DirectPromptDispatchExecution, Io as AppDataDiagnostic, Ir as evaluatePortableRuntimeAcceptance, Is as ServiceActionInvokeResult, It as ObservationState, Iu as ProjectWorkActivity, J as createShowContentTools, Ja as createServiceAppModelSlotGrantRequest, Jc as NodePlatform, Ji as SystemObjectReferenceSnapshotSource, Jl as ContextCompactionTrigger, Jn as runGatewayInboundLoop, Jo as AppPackageComponentSource, Jr as VerificationRecordStatus, Js as ServiceAppJobStatus, Jt as readServiceAppManifest, Ju as ProjectWorkStateCategory, K as serializeModelInputTail, Ka as createServiceActionGrantRequest, Kc as AgentRunReplyOptions, Ki as SystemObjectReferenceManager, Kl as ContextCompactionPreflightResult, Kn as GatewayInboundLoopRuntime, Ko as AppInstalledPermissionState, Kr as VerificationRecordObservation, Ks as ServiceAppJobList, Kt as getServiceAppManifestPath, Ku as ProjectWorkListInput, L as ExtensionLoadProgress, La as DesktopHostEvent, Lc as UserQuestionResolution, Ld as SessionEventReplayer, Li as normalizeLlmUsageModel, Ll as isContextWindowSnapshot, Ln as DirectPromptDispatchParams, Lo as AppDataEntry, Lr as evaluatePortableRuntimeAcceptanceArtifact, Ls as ServiceActionRisk, Lt as ObservationTarget, Lu as ProjectWorkActivityPage, M as AgentKernelModule, Ma as DesktopCapabilityError, Mc as SessionRequestManager, Md as SessionSteerQueuedInputResult, Mi as LlmUsageSnapshot, Ml as buildContextCompactionTimelineNcpMessage, Mn as createTypedKey, Mo as CapabilityGrantResource, Mr as PortableRuntimeAcceptanceEvidence, Ms as ServiceActionGrantRequest, Mt as ObservationEvent, Mu as PROJECT_WORK_ATTENTION_VALUES, N as AgentKernelResources, Na as DesktopCapabilityErrorCode, Nc as SessionRequestManagerOptions, Nd as UnfinishedNcpAgentRun, Ni as LlmUsageSummary, Nl as createContextCompactionMessageId, Nn as eventKeys, No as CapabilityGrantSubject, Nr as PortableRuntimeAcceptanceEvidenceArtifact, Ns as ServiceActionGrantState, Nt as ObservationExtensionRuntime, Nu as PROJECT_WORK_STATE_CATEGORIES, O as NextclawUserQuestion, Oa as createDesktopHostError, Oc as createAgentRuntimeSessionRequestDispatcher, Od as isSessionMessageCursorError, Oi as LlmUsageStats, Ol as ContextCompactionModelProjection, On as NcpMessage, Oo as CapabilityGrant, Or as isServiceAppError, Os as PanelServiceActionCaller, Ot as JsonPointer, Ou as ProjectSkillMaterial, P as AgentPlatform, Pa as DesktopHostAccess, Pc as UserQuestionError, Pd as applyNcpAgentRunLifecycleEvent, Pi as buildLlmUsageSummary, Pl as createContextWindowSignature, Pn as ingressKeys, Po as AppDataManager, Pr as PortableRuntimeAcceptanceResult, Ps as ServiceActionInvocationFacts, Pt as ObservationRef, Pu as ProjectRecentArtifact, Q as renderAgentSafetyContext, Qa as PanelAppAgentCapability, Qc as ContextProvider, Qi as CreateInboxDeliveryInput, Ql as ProductActivityKind, Qn as BuiltinNarpRuntimeProviderService, Qo as AppPackageDependencyBinding, Qr as PortableRuntimeAcceptanceDefinition, Qs as ServiceAppLifecycle, Qt as PortableRuntimeAcceptanceDefinitionView, Qu as ProjectError, R as ExtensionLoadResult, Ra as DesktopHostManifest, Rc as USER_QUESTION_EXTENSION_TYPE, Rd as AgentManager, Ri as sanitizeLlmUsage, Rl as readContextCompactionCheckpoint, Rn as DirectPromptDispatchResult, Ro as AppDataError, Rr as parsePortableRuntimeAcceptanceEvidenceArtifact, Rs as ServiceActionRuntimeState, Rt as SubscribeEventsInput, Ru as ProjectWorkActivityType, S as NextclawHarnessResources, Sa as DesktopSnapshotOptions, Sc as AccessSessionRecord, Sd as SessionPersistence, Si as PreferenceJsonValue, Sl as CONTEXT_COMPACTION_PART_START, Sn as Ingress, So as normalizeCapabilityGrantRequest, Sr as NcpAgentSessionJournalStore, Ss as AppPackageUnavailableDiagnostic, St as BuildContextTailInput, Su as SessionManagerOptions, T as NextclawSessionRunInput, Ta as DesktopHost, Tc as NextclawApplicationOptions, Td as SessionTokenUsageStatus, Ti as McpManager, Tl as CONTEXT_COMPACTION_RECOVERY_PREAMBLE, Tn as IngressHandler, To as CapabilityGrantListener, Tr as ServiceAppManager, Ts as CapabilityProviderView, Tt as EventDelivery, Tu as isProjectWorkError, U as parseSkillFrontmatter, Ua as ResolvedDesktopApplicationTarget, Uc as projectUserQuestions, Ui as isSessionContextCompactionError, Ul as shouldRefreshContextWindowImmediately, Un as dispatchChannelReplyRoute, Uo as isAppDataError, Ur as VerificationRecordError, Us as ServiceAppJobCaller, Ut as listServiceAppManifestActions, Uu as ProjectWorkItemDetail, V as SkillFrontmatter, Va as DesktopHostResponse, Vc as createQuestionMessage, Vi as SessionContextCompactionManager, Vl as readLatestContextCompactionCheckpoint, Vn as startPromptOverNcpExecution, Vo as AppDataList, Vr as VerificationRecord, Vs as ServiceAppCapabilityRequirement, Vt as buildServiceActionId, Vu as ProjectWorkAttention, W as stripSkillFrontmatter, Wa as createPanelAppAgentGrantRequest, Wc as AgentRunClient, Wi as SystemObjectReferenceError, Wl as CompactionProfileResolver, Wn as isReplyCapableChannel, Wo as AppPackageManager, Wr as VerificationRecordInput, Ws as ServiceAppJobChunkEvent, Wt as mergeServiceAppRuntimeActions, Wu as ProjectWorkItemListEntry, X as renderAgentBootstrapContext, Xa as readServiceAppSlotTarget, Xc as AgentRuntimeSessionTypeCatalog, Xi as createInboxDeliverySystemObjectProvider, Xl as CompactionSummaryProvider, Xn as BuildAgentRunSendPayloadParams, Xo as AppPackageComponentView, Xr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, Xs as ServiceAppJobView, Xt as PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, Xu as UpdateProjectWorkItemInput, Y as BootstrapContextInput, Ya as readServiceActionTargetId, Yc as NodePlatformOptions, Yi as createCronJobSystemObjectProvider, Yl as COMPACTION_RECOVERY_NOTICE, Yn as AssetApi, Yo as AppPackageComponentSourceList, Yr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, Ys as ServiceAppJobTerminalEvent, Yt as CommandRegistry, Yu as ProjectWorkSummary, Z as truncateContextText, Za as PANEL_APP_AGENT_CAPABILITIES, Zc as ContextBlock, Zi as isSystemObjectReferenceError, Zl as ContextCompactionJournalRecoveryService, Zn as buildAgentRunSendPayload, Zo as AppPackageConflict, Zr as PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, Zs as ServiceAppJobWatch, Zt as PortableRuntimeAcceptanceContractView, Zu as UpdateProjectWorkStateInput, _ as NextclawAgentDefinition, _a as SkillInfo, _c as AccessManagerOptions, _d as SessionMessageCursorError, _i as PreferenceErrorCode, _l as NextclawNcpRunContextResolveParams, _n as AppEventEnvelope, _o as isPanelAppError, _r as assertSessionJournalTailComplete, _s as AppPackageReadinessStatus, _t as readJsonPointer, _u as AgentRuntimeSessionTypeProvider, a as INextclawAgentSessions, aa as createWorkspaceByteTools, ac as ServiceAppRequirements, ad as ProjectRecord, ai as ServiceAppResidentEventInboxService, al as IToolRegistry, an as PortableRuntimeAcceptanceIdentityService, ao as PanelAppAgentSendResult, ar as RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, as as AppPackageError, at as SqliteDatabase, au as ConfigMutationResult, b as NextclawHarnessErrorCode, ba as DesktopSessionCaller, bc as AccessPrincipal, bd as SessionMetadataUpdate, bi as isPreferenceError, bl as ProviderManagerNcpLLMApi, bn as EventBus, bo as getCapabilityGrantKey, br as recoverSessionJournalTornTail, bs as AppPackageSecretSlotView, bt as ObservationManagerOptions, bu as resolveAgentRuntimeEntries, c as INextclawRun, ca as WorkspaceEntry, cc as ServiceAppResidentEventStatus, cd as ProjectTemplateId, ci as ServiceAppJobEventSink, cl as NativeAgentRuntimeResources, cn as PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, co as PanelAppCapabilityGrantCaller, cr as RuntimeDistribution, cs as AppPackageList, ct as listExtensionChannelIds, cu as ProviderModelCatalogManager, d as LLMResponse, da as WorkspaceWrite, dc as ServiceAppRuntimeStatus, dd as ProviderModelsDiscoverInput, di as PortableRunnerObservation, dl as readMetadataThinking, dn as PortableRuntimeAcceptancePresentation, do as PanelAppDeleteResult, dr as resolveRuntimeInstanceSnapshot, ds as AppPackageOperationList, dt as assertObservationJsonValue, du as ConfigPersistence, ea as InboxDeliveryErrorCode, ec as ServiceAppManifestAction, ed as ProjectManager, ei as PortableRuntimeAcceptanceId, el as IContextRegistry, en as PortableRuntimeAcceptanceStatusEntry, eo as PanelAppAgentGenerateObjectRequest, er as NARP_STDIO_RUNTIME_KIND, es as AppPackageDependencyCandidate, et as getUiContentParamsBootstrapScript, eu as ProductActivitySink, f as LLMStreamEvent, fa as LocalAgentProfileStore, fc as ServiceAppTerminalJobStatus, fd as AgentRunSession, fi as PlannedRestartRecovery, fl as resolveEffectiveModel, fn as presentPortableRuntimeAcceptanceDefinition, fo as PanelAppEntry, fr as LearningLoopRuntimeConfig, fs as AppPackageOperationResult, ft as assertObservationPredicate, fu as AgentRuntimeEntry, g as McpToolCatalogEntry, ga as InstalledSkillsList, gc as AccessManager, gd as SessionListPageOptions, gi as PreferenceError, gl as NextclawNcpResolvedRunContext, gn as AppEventEmitOptions, go as isPanelAppAgentCapability, gr as SessionJournalCompactionResult, gs as AppPackageReadinessRequirement, gt as parseObservationDuration, gu as AgentRuntimeSessionTypeOption, h as McpServerRecord, ha as InstalledSkillSummary, hc as AutomationManagerOptions, hd as SessionListFilter, hi as PlannedRestartRecoveryTicket, hl as NextclawNcpResolvedAgentProfile, hn as PanelAppAssetTokenService, ho as PanelAppList, hr as ProductFeatureControls, hs as AppPackageReadiness, ht as matchesObservationPredicate, hu as AgentRuntimeSessionTypeIcon, i as INextclawAgentRegistry, ia as isInboxDeliveryError, ic as ServiceAppRecord, id as PROJECT_TEMPLATE_IDS, ii as ResidentEventInput, il as IRuntimeRegistry, in as PortableRuntimeAcceptanceIdentityResult, io as PanelAppAgentSendRequest, ir as RUNTIME_INSTANCE_DISTRIBUTION_ENV, is as AppPackageDependencyView, it as SessionMessageSqlProjectionStore, iu as ConfigManagerRuntimeHooks, j as ProviderSpec, ja as DesktopApplicationTarget, jc as waitForAgentRuntimeSessionReply, jd as SessionQueuedInput, ji as LlmUsageRecord, jl as buildContextCompactionModelProjection, jn as Unsubscribe, jo as CapabilityGrantRequest, jr as PortableRuntimeAcceptanceEvaluationContext, js as ServiceActionGrant, jt as ObservationContextTail, ju as CreateProjectWorkStateInput, k as NextclawUserQuestionReply, ka as DESKTOP_HOST_ACCESS, kc as createAgentRuntimeSessionRequestSourceNotifier, kd as isSessionSettingsError, ki as LlmUsageStore, kl as ContextCompactionTimelineCheckpoint, kn as NcpTool, ko as CapabilityGrantDecision, kr as WorkspaceServiceDataOwner, ks as ServiceAction, kt as JsonValue, ku as ProjectWorkManager, l as INextclawSession, la as WorkspaceList, lc as ServiceAppResidentEventView, ld as LlmProviderManager, li as ServiceAppJobJournalService, ll as normalizeOptionalString, ln as PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, lo as PanelAppClientGrant, lr as RuntimeInstallationKind, ls as AppPackageOperationAction, lt as ExtensionRuntimeStatus, lu as ProviderModelCatalogSnapshot, m as McpServerDefinition, ma as InstalledSkillDetail, mc as AutomationManager, md as SessionHistoryPreparation, mi as PlannedRestartRecoveryResult, ml as syncSessionThinkingPreference, mn as McpServiceAppRuntimeService, mo as PanelAppErrorCode, mr as FeatureControlsService, ms as AppPackageOperationView, mt as evaluateObservationEventAdmission, mu as AgentRuntimeSessionTypeDescribeParams, n as Disposer, na as InboxDeliveryManagerOptions, nc as ServiceAppProtocol, nd as isProjectError, ni as ServiceAppRuntimeService, nl as IMcpRegistry, nn as PortableRuntimeAcceptanceSurfaceResult, no as PanelAppAgentRunClient, nr as RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, ns as AppPackageDependencyDiagnostic, nt as sessionJsonChunks, nu as ConfigManager, o as INextclawContributionRegistry, oa as LocalWorkspaceStore, oc as ServiceAppResidentEventDisposition, od as ProjectSessionBinding, oi as ServiceAppResidentEventScope, ol as McpToolCallInput, on as PortableRuntimeAcceptanceUnavailableIdentity, oo as PanelAppBridgeSession, or as RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, os as AppPackageErrorCode, ot as resolveLegacyEventType, ou as PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, p as McpCatalogFilter, pa as LocalConfigStore, pc as ServiceAppWitContract, pd as CreateAgentRunSessionParams, pi as PlannedRestartRecoveryManager, pl as resolveSessionChannelContext, pn as resolvePortableRuntimeAcceptanceLocale, po as PanelAppError, pr as readLearningLoopRuntimeConfig, ps as AppPackageOperationStatus, pt as buildObservationEventModelMessage, pu as AgentRuntimeProviderRegistration, q as composeAgentToolCatalog, qa as createServiceAppAgentSlotGrantRequest, qc as AgentRunStreamOptions, qi as SystemObjectReferenceProvider, ql as ContextCompactionPreflightService, qn as GatewayInboundProcessor, qo as AppPackageComponentKind, qr as VerificationRecordRole, qs as ServiceAppJobProgressEvent, qt as parseServiceAppManifest, qu as ProjectWorkState, r as INextclawAgent, ra as MAX_INBOX_DELIVERY_CONTENT_LENGTH, rc as ServiceAppProvides, rd as CreateProjectInput, ri as LeasedResidentEvent, rl as IModelRegistry, rn as PortableRuntimeAcceptanceIdentity, ro as PanelAppAgentSendPayload, rr as RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, rs as AppPackageDependencyDiagnosticCode, rt as SessionMessagePreparationStore, ru as ConfigManagerOptions, s as INextclawHarness, sa as WorkspaceByteStore, sc as ServiceAppResidentEventList, sd as ProjectTemplate, si as ServiceAppAiCapabilityService, sl as ModelChatInput, sn as normalizePortableRuntimeEnvironment, so as PanelAppCapabilityGrant, sr as ResolveRuntimeInstanceSnapshotParams, ss as AppPackageHostTarget, st as toNcpMessages, su as ProviderModelCatalogEntry, t as NextclawHarness, ta as InboxDeliveryManager, tc as ServiceAppModelCapabilitySlot, td as ProjectManagerOptions, ti as PortableRuntimeAcceptancePlatform, tl as IKernel, tn as PortableRuntimeAcceptanceStatusView, to as PanelAppAgentGenerateObjectResult, tr as DEFAULT_AGENT_RUNTIME_ENTRY_ID, ts as AppPackageDependencyCycle, tt as injectUiContentParamsBootstrap, tu as ProductActivitySource, u as INextclawSessionRegistry, ua as WorkspaceRead, uc as ServiceAppResourceRequirement, ud as LlmProviderRuntime, ui as ServiceAppJobScope, ul as readMetadataModel, un as PortableRuntimeAcceptanceLocale, uo as PanelAppContent, ur as RuntimeInstanceSnapshot, us as AppPackageOperationInput, ut as ObservationEventAdmissionDecision, uu as ChannelManager, v as NextclawContributionDescriptor, va as SkillManager, vc as AccessLoginResult, vd as SessionMessagePage, vi as PreferenceManager, vl as buildNextclawNcpRunContext, vn as AppEventHandler, vo as capabilityGrantCovers, vr as compactSessionJournal, vs as AppPackageRuntimeHooks, vt as toBoundedJson, vu as describeAgentRuntimeSessionTypes, w as NextclawSessionCreateInput, wa as DesktopHostCapabilityManager, wc as LocalProduct, wd as SessionSettingsPatch, wi as PanelAppPreferencesUpdate, wl as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, wn as IngressEnvelope, wo as CapabilityGrantLegacyMigrationService, wr as ServiceAppList, ws as AppPackageView, wt as EventAdmissionPolicy, wu as ProjectWorkErrorCode, x as NextclawHarnessOptions, xa as DesktopSessionStateService, xc as AccessRole, xd as SessionModelTokenUsage, xi as PreferenceEntry, xl as CONTEXT_COMPACTION_CONTINUATION_TEXT, xn as EventBusOptions, xo as matchesCapabilityGrantFilter, xr as restoreSessionJournalBackup, xs as AppPackageSecretStatus, xt as BindContextInput, xu as SessionManager, y as NextclawHarnessError, ya as SkillScope, yc as AccessPasswordStatus, yd as SessionMessagePart, yi as PreferenceManagerOptions, yl as createAssetTools, yn as AppEventKey, yo as createCapabilityDeclarationFingerprint, yr as recoverSessionJournalMaintenance, ys as AppPackageSecretReadiness, yt as ObservationManager, yu as normalizeAgentRuntimeSessionTypeIcon, z as ExtensionManager, za as DesktopHostMethod, zc as UserQuestionPrompt, zd as AgentProfilePersistence, zi as SessionContextCompactionError, zl as readContextRecoveryState, zn as dispatchPromptOverNcp, zo as AppDataErrorCode, zr as LegacyVerificationRecord, zs as ServiceAppAgentCapabilitySlot, zt as TypedPredicate, zu as ProjectWorkActor } from "./nextclaw-harness.manager-BDFxf9mf.js";
2
2
  import { n as getAutomaticUpdateCheckDelay, r as resolveAutomaticUpdateCheckIntervalMs, t as AUTOMATIC_UPDATE_CHECK_INTERVAL_MS } from "./automatic-update-check.utils-8_3eYuwY.js";
3
3
  import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-Dijq24Om.js";
4
4
  export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentKernelModule, AgentKernelResources, AgentManager, AgentPlatform, AgentProfilePersistence, AgentRunClient, AgentRunReply, AgentRunReplyOptions, AgentRunSession, AgentRunStreamOptions, AgentRuntimeEntry, AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeCatalog, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AgentServiceActionCaller, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, AppDocumentGrantMutationResult, AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, AppInstalledPermissionState, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyCycle, AppPackageDependencyDiagnostic, AppPackageDependencyDiagnosticCode, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageSecretReadiness, AppPackageSecretSlotView, AppPackageSecretStatus, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, BootstrapContextInput, BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, COMPACTION_RECOVERY_NOTICE, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PART_START, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_RECOVERY_PREAMBLE, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, CompactionProfileResolver, CompactionSummaryProvider, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ConfigPersistence, ContextBinding, ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, ContextProvider, ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, CreateProjectWorkItemInput, CreateProjectWorkStateInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DESKTOP_HOST_ACCESS, DESKTOP_HOST_PROTOCOL_VERSION, DesktopApplicationTarget, DesktopCapabilityError, DesktopCapabilityErrorCode, DesktopHost, DesktopHostAccess, DesktopHostCaller, DesktopHostCapabilityDeclaration, DesktopHostCapabilityManager, DesktopHostEvent, DesktopHostEventListener, DesktopHostManifest, DesktopHostMethod, DesktopHostRequest, DesktopHostResponse, DesktopHostStatus, DesktopNodeReplService, DesktopSessionCaller, DesktopSessionStateService, DesktopSnapshotOptions, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, Disposer, EventAdmissionPolicy, EventBus, EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, ExtensionRuntimeStatus, FeatureControlsService, GatewayInboundLoopRuntime, GatewayInboundProcessor, IContextRegistry, IKernel, IMcpRegistry, IModelRegistry, INextclawAgent, INextclawAgentRegistry, INextclawAgentSessions, INextclawContributionRegistry, INextclawHarness, INextclawRun, INextclawSession, INextclawSessionRegistry, IRuntimeRegistry, IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, IngressContext, IngressEnvelope, IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, Key, LLMResponse, LLMStreamEvent, LearningLoopRuntimeConfig, LeasedResidentEvent, LegacyVerificationRecord, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalAgentProfileStore, LocalConfigStore, LocalProduct, LocalWorkspaceStore, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, McpCatalogFilter, McpManager, McpServerDefinition, McpServerRecord, McpServiceAppRuntimeService, McpToolCallInput, McpToolCatalogEntry, ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NativeAgentRuntimeResources, NcpAgentSessionJournalReplayEvent, NcpAgentSessionJournalStore, NcpEndpointEvent, NcpMessage, NcpTool, NextclawAgentDefinition, NextclawApplicationOptions, NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, NextclawHarnessErrorCode, NextclawHarnessOptions, NextclawHarnessResources, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, NextclawRunStatus, NextclawSessionCreateInput, NextclawSessionRunInput, NextclawTaskInput, NextclawTaskResult, NextclawUserQuestion, NextclawUserQuestionReply, NodePlatform, NodePlatformOptions, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, PROJECT_WORK_ATTENTION_VALUES, PROJECT_WORK_STATE_CATEGORIES, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, PanelAppPreferencesUpdate, PanelServiceActionCaller, PlannedRestartRecovery, PlannedRestartRecoveryManager, PlannedRestartRecoveryResult, PlannedRestartRecoveryTicket, PortableRunnerObservation, PortableRuntimeAcceptanceContractView, PortableRuntimeAcceptanceDefinition, PortableRuntimeAcceptanceDefinitionView, PortableRuntimeAcceptanceEvaluationContext, PortableRuntimeAcceptanceEvidence, PortableRuntimeAcceptanceEvidenceArtifact, PortableRuntimeAcceptanceEvidenceSource, PortableRuntimeAcceptanceId, PortableRuntimeAcceptanceIdentity, PortableRuntimeAcceptanceIdentityResult, PortableRuntimeAcceptanceIdentityService, PortableRuntimeAcceptanceLocale, PortableRuntimeAcceptanceManager, PortableRuntimeAcceptancePlatform, PortableRuntimeAcceptancePresentation, PortableRuntimeAcceptanceResult, PortableRuntimeAcceptanceResultStatus, PortableRuntimeAcceptanceStatusEntry, PortableRuntimeAcceptanceStatusView, PortableRuntimeAcceptanceSurfaceResult, PortableRuntimeAcceptanceUnavailableIdentity, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, ProductFeatureControls, ProjectAgreementMaterial, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectMaterialService, ProjectRecentArtifact, ProjectRecentArtifactPage, ProjectRecord, ProjectSessionBinding, ProjectSkillMaterial, ProjectTemplate, ProjectTemplateId, ProjectWorkActivity, ProjectWorkActivityPage, ProjectWorkActivityType, ProjectWorkActor, ProjectWorkArtifactLink, ProjectWorkAttention, ProjectWorkError, ProjectWorkErrorCode, ProjectWorkItem, ProjectWorkItemDetail, ProjectWorkItemListEntry, ProjectWorkItemPage, ProjectWorkListInput, ProjectWorkManager, ProjectWorkState, ProjectWorkStateCategory, ProjectWorkSummary, ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, ProviderSpec, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, ResidentEventInput, ResolveRuntimeInstanceSnapshotParams, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, RuntimeDistribution, RuntimeInstallationKind, RuntimeInstanceSnapshot, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionEventReplayer, SessionHistoryPreparation, SessionJournalCompactionResult, SessionListFilter, SessionListPageOptions, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionMessagePart, SessionMessagePreparationStore, SessionMessageSqlProjectionStore, SessionMetadataUpdate, SessionModelTokenUsage, SessionPendingInput, SessionPersistence, SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, SkillInfo, SkillManager, SkillScope, SqliteDatabase, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, TypedKey, TypedPredicate, USER_QUESTION_EXTENSION_TYPE, UnavailableDesktopHost, UnfinishedNcpAgentRun, UnsignedUpdateManifest, Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateProjectWorkItemInput, UpdateProjectWorkStateInput, UpdateSnapshot, UpdateStatus, UserQuestionError, UserQuestionManager, UserQuestionPrompt, UserQuestionReplyResolution, UserQuestionResolution, UserQuestionView, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, WorkspaceByteStore, WorkspaceEntry, WorkspaceList, WorkspaceRead, WorkspaceServiceDataOwner, WorkspaceWrite, appendCurrentTimeContextTail, applyNcpAgentRunLifecycleEvent, assertObservationJsonValue, assertObservationPredicate, assertSessionJournalTailComplete, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, compactSessionJournal, composeAgentToolCatalog, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createNcpAgentSessionSummary, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createQuestionMessage, createQuestionResolutionMessage, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createShowContentTools, createTypedKey, createWorkspaceByteTools, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isProjectWorkError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, projectUserQuestions, readContextCompactionCheckpoint, readContextRecoveryState, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, recoverSessionJournalMaintenance, recoverSessionJournalTornTail, renderAgentBootstrapContext, renderAgentSafetyContext, renderSystemExecutionPolicy, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveRuntimeInstanceSnapshot, resolveSessionChannelContext, restoreSessionJournalBackup, runGatewayInboundLoop, sanitizeLlmUsage, serializeModelInputTail, serializeUnsignedUpdateManifest, sessionJsonChunks, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, truncateContextText, waitForAgentRuntimeSessionReply };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as restoreSessionJournalBackup, c as syncSessionJournalFile, d as openSqliteDatabase, f as runSqliteTransaction, i as recoverSessionJournalTornTail, l as SessionJournalLoaderStore, n as compactSessionJournal, r as recoverSessionJournalMaintenance, s as syncSessionJournalDirectory, t as assertSessionJournalTailComplete, u as NcpAgentSessionMetadataStore } from "./session-journal-maintenance.store-QClRvlO_.js";
2
- import { $ as SessionMessageSqlProjectionStore, A as ContextProviderRunContextService, B as normalizeOptionalString, C as ToolProviderRunContextService, D as readProjectId, E as createAgentToolRunTriggerInput, F as CurrentSessionContextProvider, G as syncSessionThinkingPreference, H as readMetadataThinking, I as AgentBootstrapContextProvider, J as describeAgentRuntimeSessionTypes, K as appendCurrentTimeContextTail, L as renderAgentBootstrapContext, M as ExecutionPolicyContextProvider, N as renderAgentSafetyContext, O as readProjectRoot, P as renderSystemExecutionPolicy, Q as SessionMessagePreparationStore, R as truncateContextText, S as AgentManager, T as attachSourceToolCall, U as resolveEffectiveModel, V as readMetadataModel, W as resolveSessionChannelContext, X as resolveAgentRuntimeEntries, Y as normalizeAgentRuntimeSessionTypeIcon, Z as readSessionJournalFailureContext, _ as createQuestionMessage, _t as AgentRunClient, a as dispatchAgentRuntimeSessionRequest, at as isSessionSettingsError, b as SessionManager, c as Contribution, ct as assertObservationJsonValue, d as dispatchPromptOverNcpResult, dt as evaluateObservationEventAdmission, et as SessionEventProjectionStore, f as startPromptOverNcpExecution, ft as matchesObservationPredicate, g as USER_QUESTION_EXTENSION_TYPE, gt as DEFAULT_AGENT_RUNTIME_ENTRY_ID, h as UserQuestionManager, ht as toBoundedJson, i as createAgentRuntimeSessionRequestSourceNotifier, it as isSessionMessageCursorError, j as WorkspaceMemoryContextProvider, k as buildRunMetadata, l as NextclawHarnessError, lt as assertObservationPredicate, m as UserQuestionError, mt as readJsonPointer, n as buildSessionRequestCompletionMessage, nt as SessionMessageCursorError, o as waitForAgentRuntimeSessionReply, ot as applyNcpAgentRunLifecycleEvent, p as buildAgentRunSendPayload, pt as parseObservationDuration, q as serializeModelInputTail, r as createAgentRuntimeSessionRequestDispatcher, rt as SessionSettingsError, s as SessionRequestManager, st as isNcpAgentRunLifecycleEvent, t as NextclawHarness, tt as sessionJsonChunks, u as dispatchPromptOverNcp, ut as buildObservationEventModelMessage, v as createQuestionResolutionMessage, vt as CommandRegistry, w as createShowContentTools, x as createWorkspaceByteTools, y as projectUserQuestions, z as buildNextclawNcpRunContext } from "./nextclaw-harness.manager-DIL9tOd-.js";
3
- import { A as CONTEXT_COMPACTION_RECOVERY_PREAMBLE, B as isContextWindowSnapshot, D as CONTEXT_COMPACTION_PART_START, E as CONTEXT_COMPACTION_CONTINUATION_TEXT, F as buildContextCompactionTimelineNcpMessage, G as shouldRefreshContextWindowDuringStream, H as readContextRecoveryState, I as createContextCompactionMessageId, K as shouldRefreshContextWindowImmediately, L as createContextWindowSignature, M as CONTEXT_COMPACTION_TIMELINE_KIND, N as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, O as CONTEXT_COMPACTION_PROJECTION_KIND, P as buildContextCompactionModelProjection, Q as ContextCompactionJournalRecoveryService, R as isContextCompactionProjectionMessage, T as ContextCompactionPreflightService, U as readContextWindowEventSessionId, V as readContextCompactionCheckpoint, W as readLatestContextCompactionCheckpoint, Z as composeAgentToolCatalog, c as isRecord$13, d as safeNcpSessionFilename, f as toIsoString, j as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, k as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, m as SessionEventReplayer, n as NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE, p as upsertNcpAgentSessionSummaryEvent, q as COMPACTION_RECOVERY_NOTICE, s as createNcpAgentSessionSummary, t as NCP_AGENT_SESSION_JOURNAL_INDEX_FILE, tt as STRUCTURED_RESULT_TOOL_NAME, u as normalizeNcpSessionId, z as isContextCompactionTimelineMessage } from "./ncp-agent-session-journal.utils-CkymaYrF.js";
1
+ import { a as restoreSessionJournalBackup, c as syncSessionJournalFile, d as openSqliteDatabase, f as runSqliteTransaction, i as recoverSessionJournalTornTail, l as SessionJournalLoaderStore, n as compactSessionJournal, r as recoverSessionJournalMaintenance, s as syncSessionJournalDirectory, t as assertSessionJournalTailComplete, u as NcpAgentSessionMetadataStore } from "./session-journal-maintenance.store-CizXaviA.js";
2
+ import { $ as SessionMessageSqlProjectionStore, A as ContextProviderRunContextService, B as normalizeOptionalString, C as ToolProviderRunContextService, D as readProjectId, E as createAgentToolRunTriggerInput, F as CurrentSessionContextProvider, G as syncSessionThinkingPreference, H as readMetadataThinking, I as AgentBootstrapContextProvider, J as describeAgentRuntimeSessionTypes, K as appendCurrentTimeContextTail, L as renderAgentBootstrapContext, M as ExecutionPolicyContextProvider, N as renderAgentSafetyContext, O as readProjectRoot, P as renderSystemExecutionPolicy, Q as SessionMessagePreparationStore, R as truncateContextText, S as AgentManager, T as attachSourceToolCall, U as resolveEffectiveModel, V as readMetadataModel, W as resolveSessionChannelContext, X as resolveAgentRuntimeEntries, Y as normalizeAgentRuntimeSessionTypeIcon, Z as readSessionJournalFailureContext, _ as createQuestionMessage, _t as AgentRunClient, a as dispatchAgentRuntimeSessionRequest, at as isSessionSettingsError, b as SessionManager, c as Contribution, ct as assertObservationJsonValue, d as dispatchPromptOverNcpResult, dt as evaluateObservationEventAdmission, et as SessionEventProjectionStore, f as startPromptOverNcpExecution, ft as matchesObservationPredicate, g as USER_QUESTION_EXTENSION_TYPE, gt as DEFAULT_AGENT_RUNTIME_ENTRY_ID, h as UserQuestionManager, ht as toBoundedJson, i as createAgentRuntimeSessionRequestSourceNotifier, it as isSessionMessageCursorError, j as WorkspaceMemoryContextProvider, k as buildRunMetadata, l as NextclawHarnessError, lt as assertObservationPredicate, m as UserQuestionError, mt as readJsonPointer, n as buildSessionRequestCompletionMessage, nt as SessionMessageCursorError, o as waitForAgentRuntimeSessionReply, ot as applyNcpAgentRunLifecycleEvent, p as buildAgentRunSendPayload, pt as parseObservationDuration, q as serializeModelInputTail, r as createAgentRuntimeSessionRequestDispatcher, rt as SessionSettingsError, s as SessionRequestManager, st as isNcpAgentRunLifecycleEvent, t as NextclawHarness, tt as sessionJsonChunks, u as dispatchPromptOverNcp, ut as buildObservationEventModelMessage, v as createQuestionResolutionMessage, vt as CommandRegistry, w as createShowContentTools, x as createWorkspaceByteTools, y as projectUserQuestions, z as buildNextclawNcpRunContext } from "./nextclaw-harness.manager-CjDdaCHx.js";
3
+ import { A as CONTEXT_COMPACTION_RECOVERY_PREAMBLE, B as isContextWindowSnapshot, D as CONTEXT_COMPACTION_PART_START, E as CONTEXT_COMPACTION_CONTINUATION_TEXT, F as buildContextCompactionTimelineNcpMessage, G as shouldRefreshContextWindowDuringStream, H as readContextRecoveryState, I as createContextCompactionMessageId, K as shouldRefreshContextWindowImmediately, L as createContextWindowSignature, M as CONTEXT_COMPACTION_TIMELINE_KIND, N as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, O as CONTEXT_COMPACTION_PROJECTION_KIND, P as buildContextCompactionModelProjection, Q as ContextCompactionJournalRecoveryService, R as isContextCompactionProjectionMessage, T as ContextCompactionPreflightService, U as readContextWindowEventSessionId, V as readContextCompactionCheckpoint, W as readLatestContextCompactionCheckpoint, Z as composeAgentToolCatalog, c as isRecord$13, d as safeNcpSessionFilename, f as toIsoString, j as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, k as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, m as SessionEventReplayer, n as NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE, p as upsertNcpAgentSessionSummaryEvent, q as COMPACTION_RECOVERY_NOTICE, s as createNcpAgentSessionSummary, t as NCP_AGENT_SESSION_JOURNAL_INDEX_FILE, tt as STRUCTURED_RESULT_TOOL_NAME, u as normalizeNcpSessionId, z as isContextCompactionTimelineMessage } from "./ncp-agent-session-journal.utils-DPKiIDII.js";
4
4
  import { i as isSessionJournalDelta, n as canCoalesceSessionJournalDeltas, r as coalesceSessionJournalDeltas } from "./session-journal-delta-coalescer.utils-CI-N-Zpj.js";
5
5
  import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
6
6
  import { n as getUnsignedUpdateManifest, r as serializeUnsignedUpdateManifest, t as UpdateManifestReader } from "./update-manifest.types-DUocefbs.js";
@@ -15886,7 +15886,7 @@ var NcpAgentSessionMessageProjectionPersistenceStore = class extends SessionMess
15886
15886
  prepare = async (sessionId, signal, onProgress) => {
15887
15887
  const { stat } = await import("node:fs/promises");
15888
15888
  const { scanBoundedSessionJournal } = await import("./session-journal-stream.utils-CupSA3YS.js");
15889
- const { recoverSessionJournalTornTail } = await import("./session-journal-maintenance.store-QClRvlO_.js").then((n) => n.o);
15889
+ const { recoverSessionJournalTornTail } = await import("./session-journal-maintenance.store-CizXaviA.js").then((n) => n.o);
15890
15890
  await recoverSessionJournalTornTail(this.journalPath(sessionId), signal);
15891
15891
  const journalBytes = (await stat(this.journalPath(sessionId))).size;
15892
15892
  const journalIdentity = await this.journalIdentity(sessionId);
@@ -15999,7 +15999,7 @@ var NcpAgentSessionMessageProjectionPersistenceStore = class extends SessionMess
15999
15999
  }
16000
16000
  };
16001
16001
  readJournalTailMessages = async (sessionId, meta) => {
16002
- const { readNcpAgentSessionProjectionTail } = await import("./ncp-agent-session-message-projection-tail.store-_7hsonM_.js");
16002
+ const { readNcpAgentSessionProjectionTail } = await import("./ncp-agent-session-message-projection-tail.store-Cne7-WRQ.js");
16003
16003
  return readNcpAgentSessionProjectionTail(this.journalPath(sessionId), meta, async (messageId) => {
16004
16004
  const database = await this.database(sessionId);
16005
16005
  if (!database) return null;
@@ -1,4 +1,4 @@
1
- import { c as isRecord, f as toIsoString, l as normalizeNcpAgentId } from "./ncp-agent-session-journal.utils-CkymaYrF.js";
1
+ import { c as isRecord, f as toIsoString, l as normalizeNcpAgentId } from "./ncp-agent-session-journal.utils-DPKiIDII.js";
2
2
  import { open } from "node:fs/promises";
3
3
  import { NcpEventType } from "@nextclaw/ncp";
4
4
  import { createInterface } from "node:readline";
@@ -109,4 +109,4 @@ async function scanSessionJournal(params) {
109
109
  //#endregion
110
110
  export { scanSessionJournal as t };
111
111
 
112
- //# sourceMappingURL=ncp-agent-session-journal-entry.utils-oYJG8jpX.js.map
112
+ //# sourceMappingURL=ncp-agent-session-journal-entry.utils-BmQvCIr4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ncp-agent-session-journal-entry.utils-oYJG8jpX.js","names":[],"sources":["../src/utils/ncp-agent-session-journal-entry.utils.ts"],"sourcesContent":["import { NcpEventType } from \"@nextclaw/ncp\";\nimport { open } from \"node:fs/promises\";\nimport { createInterface } from \"node:readline\";\nimport {\n isRecord,\n NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE,\n type NcpAgentSessionJournalEventEntry,\n type NcpAgentSessionJournalReplayEvent,\n normalizeNcpAgentId,\n toIsoString\n} from \"./ncp-agent-session-journal.utils.js\";\n\nexport type ParsedNcpAgentSessionJournal = {\n metadata: Record<string, unknown>;\n agentId?: string;\n createdAt: string;\n updatedAt: string;\n nextSeq: number;\n projectedJournalOffset: number;\n events: NcpAgentSessionJournalReplayEvent[];\n};\n\nexport function isNcpAgentSessionMessageProjectionBoundaryEvent(event: NcpAgentSessionJournalReplayEvent): boolean {\n return (\n event.type === NcpEventType.MessageSent ||\n event.type === NcpEventType.MessageCompleted ||\n event.type === NcpEventType.MessageAbort ||\n event.type === NcpEventType.RunFinished ||\n event.type === NcpEventType.RunError ||\n event.type === NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE\n );\n}\n\nexport function serializeNcpAgentSessionJournalEntry(entry: NcpAgentSessionJournalEventEntry): string {\n const serialized = JSON.stringify(entry);\n if (!serialized) {\n throw new Error(\"ncp agent session journal entry serialization produced empty output\");\n }\n const parsed = JSON.parse(serialized) as unknown;\n if (!isRecord(parsed)) {\n throw new Error(\"ncp agent session journal entry serialization produced a non-object entry\");\n }\n return serialized;\n}\n\nexport function attachNcpAgentSessionJournalTimestamp(\n event: NcpAgentSessionJournalReplayEvent,\n timestamp: string\n): NcpAgentSessionJournalReplayEvent {\n if (!(\"payload\" in event) || !isRecord(event.payload)) {\n return event;\n }\n return {\n ...event,\n payload: {\n ...event.payload,\n timestamp\n }\n } as unknown as NcpAgentSessionJournalReplayEvent;\n}\n\nexport class NcpAgentSessionJournalParser {\n private metadata: Record<string, unknown> = {};\n private agentId: string | undefined;\n private createdAt = new Date().toISOString();\n private updatedAt = this.createdAt;\n private nextSeq = 1;\n private projectedJournalOffset = 0;\n private readonly events: NcpAgentSessionJournalReplayEvent[] = [];\n\n constructor(private readonly collectEvents = true) {}\n\n append = (line: string, index: number, lineEndOffset: number): NcpAgentSessionJournalReplayEvent | null => {\n if (!line.trim()) {\n return null;\n }\n const parsed = this.parseLine(line, index);\n if (!parsed) {\n return null;\n }\n if (parsed._type === \"metadata\") {\n this.applyMetadata(parsed);\n return null;\n }\n if (parsed._type === \"event\" && isRecord(parsed.event)) {\n return this.applyEvent(parsed, lineEndOffset);\n }\n return null;\n };\n\n finish = (): ParsedNcpAgentSessionJournal => ({\n metadata: this.metadata,\n ...(this.agentId ? { agentId: this.agentId } : {}),\n createdAt: this.createdAt,\n updatedAt: this.updatedAt,\n nextSeq: this.nextSeq,\n projectedJournalOffset: this.projectedJournalOffset,\n events: this.events\n });\n\n private parseLine = (line: string, index: number): Record<string, unknown> | null => {\n try {\n const parsed = JSON.parse(line) as unknown;\n return isRecord(parsed) ? parsed : null;\n } catch (error) {\n console.warn(\n `[ncp-agent-session-journal] skipped corrupted journal line ${index + 1}: ${error instanceof Error ? error.message : String(error)}`\n );\n return null;\n }\n };\n\n private applyMetadata = (entry: Record<string, unknown>): void => {\n this.metadata = isRecord(entry.metadata) ? structuredClone(entry.metadata) : {};\n this.agentId = normalizeNcpAgentId(typeof entry.agent_id === \"string\" ? entry.agent_id : undefined);\n this.createdAt = toIsoString(entry.created_at, this.createdAt);\n this.updatedAt = toIsoString(entry.updated_at, this.updatedAt);\n };\n\n private applyEvent = (entry: Record<string, unknown>, lineEndOffset: number): NcpAgentSessionJournalReplayEvent => {\n const seq = Number(entry.seq);\n this.nextSeq = Math.max(this.nextSeq, Number.isFinite(seq) ? Math.trunc(seq) + 1 : this.nextSeq);\n const eventTimestamp = toIsoString(entry.timestamp, this.updatedAt);\n this.updatedAt = eventTimestamp;\n const event = structuredClone(entry.event) as NcpAgentSessionJournalReplayEvent;\n const replayEvent = attachNcpAgentSessionJournalTimestamp(event, eventTimestamp);\n if (this.collectEvents) this.events.push(replayEvent);\n if (isNcpAgentSessionMessageProjectionBoundaryEvent(replayEvent)) {\n this.projectedJournalOffset = lineEndOffset;\n }\n return replayEvent;\n };\n}\n\nexport function parseNcpAgentSessionJournal(raw: string): ParsedNcpAgentSessionJournal {\n const parser = new NcpAgentSessionJournalParser();\n let byteOffset = 0;\n const lines = raw.split(\"\\n\");\n for (const [index, line] of lines.entries()) {\n const lineEndOffset = byteOffset + Buffer.byteLength(line, \"utf-8\") + (index < lines.length - 1 ? 1 : 0);\n parser.append(line, index, lineEndOffset);\n byteOffset = lineEndOffset;\n }\n return parser.finish();\n}\n\nexport async function scanSessionJournal(params: {\n path: string;\n startOffset?: number;\n endOffset: number;\n onEvent?: (event: NcpAgentSessionJournalReplayEvent, eventIndex: number) => Promise<void> | void;\n}): Promise<ParsedNcpAgentSessionJournal> {\n const { endOffset, onEvent, path } = params;\n const startOffset = Math.max(0, params.startOffset ?? 0);\n const parser = new NcpAgentSessionJournalParser(false);\n if (endOffset <= startOffset) return parser.finish();\n const file = await open(path, \"r\");\n const stream = file.createReadStream({\n start: startOffset,\n end: endOffset - 1,\n encoding: \"utf-8\",\n autoClose: false,\n });\n const lines = createInterface({ input: stream, crlfDelay: Infinity });\n let lineIndex = 0;\n let byteOffset = startOffset;\n try {\n for await (const line of lines) {\n const lineEndOffset = Math.min(\n endOffset,\n byteOffset + Buffer.byteLength(line, \"utf-8\") + 1,\n );\n const event = parser.append(line, lineIndex, lineEndOffset);\n if (event) await onEvent?.(event, lineIndex);\n byteOffset = lineEndOffset;\n lineIndex += 1;\n }\n return parser.finish();\n } finally {\n lines.close();\n stream.destroy();\n await file.close();\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"ncp-agent-session-journal-entry.utils-BmQvCIr4.js","names":[],"sources":["../src/utils/ncp-agent-session-journal-entry.utils.ts"],"sourcesContent":["import { NcpEventType } from \"@nextclaw/ncp\";\nimport { open } from \"node:fs/promises\";\nimport { createInterface } from \"node:readline\";\nimport {\n isRecord,\n NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE,\n type NcpAgentSessionJournalEventEntry,\n type NcpAgentSessionJournalReplayEvent,\n normalizeNcpAgentId,\n toIsoString\n} from \"./ncp-agent-session-journal.utils.js\";\n\nexport type ParsedNcpAgentSessionJournal = {\n metadata: Record<string, unknown>;\n agentId?: string;\n createdAt: string;\n updatedAt: string;\n nextSeq: number;\n projectedJournalOffset: number;\n events: NcpAgentSessionJournalReplayEvent[];\n};\n\nexport function isNcpAgentSessionMessageProjectionBoundaryEvent(event: NcpAgentSessionJournalReplayEvent): boolean {\n return (\n event.type === NcpEventType.MessageSent ||\n event.type === NcpEventType.MessageCompleted ||\n event.type === NcpEventType.MessageAbort ||\n event.type === NcpEventType.RunFinished ||\n event.type === NcpEventType.RunError ||\n event.type === NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE\n );\n}\n\nexport function serializeNcpAgentSessionJournalEntry(entry: NcpAgentSessionJournalEventEntry): string {\n const serialized = JSON.stringify(entry);\n if (!serialized) {\n throw new Error(\"ncp agent session journal entry serialization produced empty output\");\n }\n const parsed = JSON.parse(serialized) as unknown;\n if (!isRecord(parsed)) {\n throw new Error(\"ncp agent session journal entry serialization produced a non-object entry\");\n }\n return serialized;\n}\n\nexport function attachNcpAgentSessionJournalTimestamp(\n event: NcpAgentSessionJournalReplayEvent,\n timestamp: string\n): NcpAgentSessionJournalReplayEvent {\n if (!(\"payload\" in event) || !isRecord(event.payload)) {\n return event;\n }\n return {\n ...event,\n payload: {\n ...event.payload,\n timestamp\n }\n } as unknown as NcpAgentSessionJournalReplayEvent;\n}\n\nexport class NcpAgentSessionJournalParser {\n private metadata: Record<string, unknown> = {};\n private agentId: string | undefined;\n private createdAt = new Date().toISOString();\n private updatedAt = this.createdAt;\n private nextSeq = 1;\n private projectedJournalOffset = 0;\n private readonly events: NcpAgentSessionJournalReplayEvent[] = [];\n\n constructor(private readonly collectEvents = true) {}\n\n append = (line: string, index: number, lineEndOffset: number): NcpAgentSessionJournalReplayEvent | null => {\n if (!line.trim()) {\n return null;\n }\n const parsed = this.parseLine(line, index);\n if (!parsed) {\n return null;\n }\n if (parsed._type === \"metadata\") {\n this.applyMetadata(parsed);\n return null;\n }\n if (parsed._type === \"event\" && isRecord(parsed.event)) {\n return this.applyEvent(parsed, lineEndOffset);\n }\n return null;\n };\n\n finish = (): ParsedNcpAgentSessionJournal => ({\n metadata: this.metadata,\n ...(this.agentId ? { agentId: this.agentId } : {}),\n createdAt: this.createdAt,\n updatedAt: this.updatedAt,\n nextSeq: this.nextSeq,\n projectedJournalOffset: this.projectedJournalOffset,\n events: this.events\n });\n\n private parseLine = (line: string, index: number): Record<string, unknown> | null => {\n try {\n const parsed = JSON.parse(line) as unknown;\n return isRecord(parsed) ? parsed : null;\n } catch (error) {\n console.warn(\n `[ncp-agent-session-journal] skipped corrupted journal line ${index + 1}: ${error instanceof Error ? error.message : String(error)}`\n );\n return null;\n }\n };\n\n private applyMetadata = (entry: Record<string, unknown>): void => {\n this.metadata = isRecord(entry.metadata) ? structuredClone(entry.metadata) : {};\n this.agentId = normalizeNcpAgentId(typeof entry.agent_id === \"string\" ? entry.agent_id : undefined);\n this.createdAt = toIsoString(entry.created_at, this.createdAt);\n this.updatedAt = toIsoString(entry.updated_at, this.updatedAt);\n };\n\n private applyEvent = (entry: Record<string, unknown>, lineEndOffset: number): NcpAgentSessionJournalReplayEvent => {\n const seq = Number(entry.seq);\n this.nextSeq = Math.max(this.nextSeq, Number.isFinite(seq) ? Math.trunc(seq) + 1 : this.nextSeq);\n const eventTimestamp = toIsoString(entry.timestamp, this.updatedAt);\n this.updatedAt = eventTimestamp;\n const event = structuredClone(entry.event) as NcpAgentSessionJournalReplayEvent;\n const replayEvent = attachNcpAgentSessionJournalTimestamp(event, eventTimestamp);\n if (this.collectEvents) this.events.push(replayEvent);\n if (isNcpAgentSessionMessageProjectionBoundaryEvent(replayEvent)) {\n this.projectedJournalOffset = lineEndOffset;\n }\n return replayEvent;\n };\n}\n\nexport function parseNcpAgentSessionJournal(raw: string): ParsedNcpAgentSessionJournal {\n const parser = new NcpAgentSessionJournalParser();\n let byteOffset = 0;\n const lines = raw.split(\"\\n\");\n for (const [index, line] of lines.entries()) {\n const lineEndOffset = byteOffset + Buffer.byteLength(line, \"utf-8\") + (index < lines.length - 1 ? 1 : 0);\n parser.append(line, index, lineEndOffset);\n byteOffset = lineEndOffset;\n }\n return parser.finish();\n}\n\nexport async function scanSessionJournal(params: {\n path: string;\n startOffset?: number;\n endOffset: number;\n onEvent?: (event: NcpAgentSessionJournalReplayEvent, eventIndex: number) => Promise<void> | void;\n}): Promise<ParsedNcpAgentSessionJournal> {\n const { endOffset, onEvent, path } = params;\n const startOffset = Math.max(0, params.startOffset ?? 0);\n const parser = new NcpAgentSessionJournalParser(false);\n if (endOffset <= startOffset) return parser.finish();\n const file = await open(path, \"r\");\n const stream = file.createReadStream({\n start: startOffset,\n end: endOffset - 1,\n encoding: \"utf-8\",\n autoClose: false,\n });\n const lines = createInterface({ input: stream, crlfDelay: Infinity });\n let lineIndex = 0;\n let byteOffset = startOffset;\n try {\n for await (const line of lines) {\n const lineEndOffset = Math.min(\n endOffset,\n byteOffset + Buffer.byteLength(line, \"utf-8\") + 1,\n );\n const event = parser.append(line, lineIndex, lineEndOffset);\n if (event) await onEvent?.(event, lineIndex);\n byteOffset = lineEndOffset;\n lineIndex += 1;\n }\n return parser.finish();\n } finally {\n lines.close();\n stream.destroy();\n await file.close();\n }\n}\n"],"mappings":"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"}
@@ -404,9 +404,16 @@ const SUMMARY_TIMEOUT_MS = 6e4;
404
404
  var UnusableCompactionSummary = class extends Error {};
405
405
  const COMPACTION_RECOVERY_NOTICE = [
406
406
  "Earlier conversation is archived, not reliably summarized. Its constraints and action outcomes remain unresolved.",
407
- "Read the original session history before relying on old facts. Do not repeat actions or infer completion.",
408
- "Only read-only recovery is permitted. If required business conditions cannot be verified, ask a specific clarification."
407
+ "Read the original session history before relying on old facts. Do not assume an unknown old action succeeded or automatically replay it to fill a history gap.",
408
+ "Continue the user's current request with available tools and confirmed conditions. Verify missing earlier constraints or action outcomes from original history before relying on them; do not repeat old operations solely because their results are absent. Ask a specific clarification only when a necessary fact cannot be verified."
409
409
  ].join("\n");
410
+ function isCompactionRecoveryNotice(summary) {
411
+ return summary === COMPACTION_RECOVERY_NOTICE || summary === [
412
+ "Earlier conversation is archived, not reliably summarized. Its constraints and action outcomes remain unresolved.",
413
+ "Read the original session history before relying on old facts. Do not repeat actions or infer completion.",
414
+ "Only read-only recovery is permitted. If required business conditions cannot be verified, ask a specific clarification."
415
+ ].join("\n");
416
+ }
410
417
  var ContextCompactionSummaryGenerationService = class {
411
418
  constructor(providerManager) {
412
419
  this.providerManager = providerManager;
@@ -513,7 +520,7 @@ const CONTEXT_COMPACTION_PROJECTION_KIND = "compressed_context";
513
520
  const CONTEXT_COMPACTION_PART_START = "nextclaw_compaction_part_start";
514
521
  const CONTEXT_COMPACTION_CONTINUATION_TEXT = "Continue the active run from the compressed working context. Do not repeat completed tool calls; proceed with the next required action.";
515
522
  const CONTEXT_COMPACTION_SYSTEM_PREAMBLE = ["Compressed working context for this session. Original messages and recorded tool outcomes remain authoritative; verify uncertain constraints and effects using session history.", "Continue from this context and any following messages. Do not restart onboarding or treat missing profile fields as a new-session trigger unless the compressed context says onboarding is the active user task."].join("\n");
516
- const CONTEXT_COMPACTION_RECOVERY_PREAMBLE = "Unresolved archived history: read original session history to verify old constraints and action outcomes. Only read-only recovery is permitted; ask a specific business clarification if required facts remain unknown.";
523
+ const CONTEXT_COMPACTION_RECOVERY_PREAMBLE = "Some earlier history is archived or incomplete. Continue the user's current request with the available tools and confirmed conditions. Read original session history when an older constraint or action outcome matters; do not repeat an old operation solely because its result is missing here. Ask a specific clarification only if a necessary fact cannot be verified. Archived history does not revoke existing authorization or require blanket reconfirmation.";
517
524
  function readCheckpointTimelineText(checkpoint) {
518
525
  if (checkpoint.status === "compressing") return "Compressing earlier context";
519
526
  if (checkpoint.status === "compressed") return "Earlier context was auto-compacted";
@@ -524,7 +531,7 @@ function buildCompressedContextSystemText(checkpoint) {
524
531
  return [
525
532
  CONTEXT_COMPACTION_SYSTEM_PREAMBLE,
526
533
  "",
527
- !checkpoint.recovery && checkpoint.summary === COMPACTION_RECOVERY_NOTICE ? "Earlier conversation remains archived. Follow the latest human-confirmed task conditions and read original history for any older facts needed." : checkpoint.summary,
534
+ isCompactionRecoveryNotice(checkpoint.summary) ? checkpoint.recovery ? COMPACTION_RECOVERY_NOTICE : "Earlier conversation remains archived. Follow the latest human-confirmed task conditions and read original history for any older facts needed." : checkpoint.summary,
528
535
  ...checkpoint.recovery ? [CONTEXT_COMPACTION_RECOVERY_PREAMBLE] : []
529
536
  ].join("\n");
530
537
  }
@@ -1458,4 +1465,4 @@ function readMessageFromSummaryEvent(event) {
1458
1465
  //#endregion
1459
1466
  export { resolveNcpAgentSessionLabel as $, CONTEXT_COMPACTION_RECOVERY_PREAMBLE as A, isContextWindowSnapshot as B, readEventToolCallId as C, CONTEXT_COMPACTION_PART_START as D, CONTEXT_COMPACTION_CONTINUATION_TEXT as E, buildContextCompactionTimelineNcpMessage as F, shouldRefreshContextWindowDuringStream as G, readContextRecoveryState as H, createContextCompactionMessageId as I, buildContextBlockInputMessages as J, shouldRefreshContextWindowImmediately as K, createContextWindowSignature as L, CONTEXT_COMPACTION_TIMELINE_KIND as M, NEXTCLAW_TIMELINE_KIND_METADATA_KEY as N, CONTEXT_COMPACTION_PROJECTION_KIND as O, buildContextCompactionModelProjection as P, ContextCompactionJournalRecoveryService as Q, isContextCompactionProjectionMessage as R, readEventRunId as S, ContextCompactionPreflightService as T, readContextWindowEventSessionId as U, readContextCompactionCheckpoint as V, readLatestContextCompactionCheckpoint as W, estimateToolInputTokens as X, buildProviderTools as Y, composeAgentToolCatalog as Z, seedReplayToolOwners as _, NCP_SESSION_REQUEST_FAILED_EVENT_TYPE as a, isStreamingMessageCreationEvent as b, isRecord as c, safeNcpSessionFilename as d, createAgentPeerSessionIdentity as et, toIsoString as f, readReplayToolOwners as g, mergePartialSessionMessage as h, NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE as i, CONTEXT_COMPACTION_SYSTEM_PREAMBLE as j, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY as k, normalizeNcpAgentId as l, SessionEventReplayer as m, NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE as n, StructuredResultSubmitTool as nt, createNcpAgentSessionJournalMetadataEntry as o, upsertNcpAgentSessionSummaryEvent as p, COMPACTION_RECOVERY_NOTICE as q, NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE as r, createNcpAgentSessionSummary as s, NCP_AGENT_SESSION_JOURNAL_INDEX_FILE as t, STRUCTURED_RESULT_TOOL_NAME as tt, normalizeNcpSessionId as u, SessionReplaySupersessionTracker as v, readMessageFromSummaryEvent$1 as w, readEventMessageId as x, isReplayContinuationEvent as y, isContextCompactionTimelineMessage as z };
1460
1467
 
1461
- //# sourceMappingURL=ncp-agent-session-journal.utils-CkymaYrF.js.map
1468
+ //# sourceMappingURL=ncp-agent-session-journal.utils-DPKiIDII.js.map