@nextclaw/shared 0.4.18 → 0.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +49 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ declare class EventBus {
|
|
|
65
65
|
type IngressEnvelope<TPayload = unknown> = {
|
|
66
66
|
type: Key<TPayload>;
|
|
67
67
|
extensionId?: string;
|
|
68
|
+
generation?: string;
|
|
68
69
|
payload?: TPayload;
|
|
69
70
|
source?: string;
|
|
70
71
|
};
|
|
@@ -344,17 +345,32 @@ type ExtensionResponseIngressPayload = {
|
|
|
344
345
|
message: string;
|
|
345
346
|
};
|
|
346
347
|
};
|
|
348
|
+
type ExtensionRuntimeReadyIngressPayload = {
|
|
349
|
+
generation: string;
|
|
350
|
+
pid: number;
|
|
351
|
+
};
|
|
347
352
|
type AgentRunSessionMessageRequestPayload = {
|
|
348
353
|
message: NcpMessage;
|
|
349
354
|
requestId: string;
|
|
350
355
|
sessionId: string;
|
|
351
356
|
};
|
|
352
357
|
declare const CHAT_SESSION_MATERIALIZATION_METADATA_KEY = "session_materialization";
|
|
358
|
+
declare const CHAT_CONTINUATION_TARGET_MESSAGE_METADATA_KEY = "chat_continuation_target_message_id";
|
|
353
359
|
type AgentRunSessionMaterializationMetadata = {
|
|
354
360
|
kind: "child";
|
|
355
361
|
parentSessionId: string;
|
|
356
362
|
inheritContext: true;
|
|
357
363
|
};
|
|
364
|
+
type AgentRunEditMessageIngressPayload = {
|
|
365
|
+
correlationId?: string;
|
|
366
|
+
message: NcpMessage;
|
|
367
|
+
messageId: string;
|
|
368
|
+
sessionId: string;
|
|
369
|
+
};
|
|
370
|
+
type AgentRunContinueIngressPayload = {
|
|
371
|
+
correlationId?: string;
|
|
372
|
+
sessionId: string;
|
|
373
|
+
};
|
|
358
374
|
type AgentRunSendIngressMetadata = Record<string, unknown> & {
|
|
359
375
|
agentRuntimeId?: string;
|
|
360
376
|
agentId?: string;
|
|
@@ -386,11 +402,14 @@ declare const ingressKeys: {
|
|
|
386
402
|
readonly channelMessageSubmit: TypedKey<ExtensionChannelMessageSubmitIngressPayload>;
|
|
387
403
|
readonly channelCommandList: TypedKey<ExtensionChannelCommandListIngressPayload>;
|
|
388
404
|
readonly channelCommandExecute: TypedKey<ExtensionChannelCommandExecuteIngressPayload>;
|
|
405
|
+
readonly runtimeReady: TypedKey<ExtensionRuntimeReadyIngressPayload>;
|
|
389
406
|
readonly response: TypedKey<ExtensionResponseIngressPayload>;
|
|
390
407
|
};
|
|
391
408
|
readonly agentRun: {
|
|
392
409
|
readonly send: TypedKey<AgentRunSendIngressPayload>;
|
|
393
410
|
readonly abort: TypedKey<NcpMessageAbortPayload>;
|
|
411
|
+
readonly editMessage: TypedKey<AgentRunEditMessageIngressPayload>;
|
|
412
|
+
readonly continue: TypedKey<AgentRunContinueIngressPayload>;
|
|
394
413
|
readonly sessionMessageRequest: TypedKey<AgentRunSessionMessageRequestPayload>;
|
|
395
414
|
};
|
|
396
415
|
};
|
|
@@ -405,8 +424,10 @@ declare function normalizeRuntimeModelSelectionMode(value: unknown): RuntimeMode
|
|
|
405
424
|
declare const CHAT_INLINE_TOKENS_METADATA_KEY = "ui_inline_tokens";
|
|
406
425
|
declare const CHAT_INLINE_TOKENS_SCHEMA_VERSION = 2;
|
|
407
426
|
declare const CHAT_PROJECT_TOKEN_KIND = "project";
|
|
427
|
+
declare const CHAT_CONVERSATION_EXCERPT_TOKEN_KIND = "conversation_excerpt";
|
|
408
428
|
declare const CHAT_WORKSPACE_FILE_TOKEN_KIND = "workspace_file";
|
|
409
429
|
declare const CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND = "workspace_directory";
|
|
430
|
+
declare const CHAT_WORKSPACE_EXCERPT_TOKEN_KIND = "workspace_excerpt";
|
|
410
431
|
type ChatSkillSource = "builtin" | "global" | "project" | "workspace";
|
|
411
432
|
type ChatSkillInlineTokenMetadata = {
|
|
412
433
|
kind: "skill";
|
|
@@ -423,13 +444,32 @@ type ChatWorkspaceInlineTokenMetadata = {
|
|
|
423
444
|
label: string;
|
|
424
445
|
rawText: string;
|
|
425
446
|
};
|
|
447
|
+
type ChatWorkspaceExcerptInlineTokenMetadata = {
|
|
448
|
+
kind: typeof CHAT_WORKSPACE_EXCERPT_TOKEN_KIND;
|
|
449
|
+
key: string;
|
|
450
|
+
path: string;
|
|
451
|
+
label: string;
|
|
452
|
+
excerpt: string;
|
|
453
|
+
startLine: number | null;
|
|
454
|
+
endLine: number | null;
|
|
455
|
+
rawText: string;
|
|
456
|
+
};
|
|
457
|
+
type ChatConversationExcerptInlineTokenMetadata = {
|
|
458
|
+
kind: typeof CHAT_CONVERSATION_EXCERPT_TOKEN_KIND;
|
|
459
|
+
key: string;
|
|
460
|
+
messageId: string;
|
|
461
|
+
role: "assistant" | "user";
|
|
462
|
+
label: string;
|
|
463
|
+
excerpt: string;
|
|
464
|
+
rawText: string;
|
|
465
|
+
};
|
|
426
466
|
type ChatProjectInlineTokenMetadata = {
|
|
427
467
|
kind: typeof CHAT_PROJECT_TOKEN_KIND;
|
|
428
468
|
key: string;
|
|
429
469
|
label: string;
|
|
430
470
|
rawText: string;
|
|
431
471
|
};
|
|
432
|
-
type ChatInlineTokenMetadata = ChatSkillInlineTokenMetadata | ChatProjectInlineTokenMetadata | ChatWorkspaceInlineTokenMetadata;
|
|
472
|
+
type ChatInlineTokenMetadata = ChatSkillInlineTokenMetadata | ChatProjectInlineTokenMetadata | ChatWorkspaceInlineTokenMetadata | ChatWorkspaceExcerptInlineTokenMetadata | ChatConversationExcerptInlineTokenMetadata;
|
|
433
473
|
type ChatInlineTokensMetadata = {
|
|
434
474
|
schemaVersion: typeof CHAT_INLINE_TOKENS_SCHEMA_VERSION;
|
|
435
475
|
items: ChatInlineTokenMetadata[];
|
|
@@ -444,6 +484,13 @@ declare const PANEL_APP_INLINE_HOST_CONTRACT: {
|
|
|
444
484
|
readonly placementSearchParam: "nextclawPlacement";
|
|
445
485
|
};
|
|
446
486
|
//#endregion
|
|
487
|
+
//#region src/configs/panel-app-scroll-restoration.config.d.ts
|
|
488
|
+
declare const PANEL_APP_SCROLL_RESTORATION_CONTRACT: {
|
|
489
|
+
readonly restoreScrollMessageType: "nextclaw:panel-app-restore-scroll";
|
|
490
|
+
readonly scrollMessageType: "nextclaw:panel-app-scroll";
|
|
491
|
+
readonly version: 1;
|
|
492
|
+
};
|
|
493
|
+
//#endregion
|
|
447
494
|
//#region src/utils/inline-content-height.utils.d.ts
|
|
448
495
|
type InlineContentElement = {
|
|
449
496
|
readonly clientHeight: number;
|
|
@@ -472,5 +519,5 @@ declare function readUiContentParams(value: unknown): UiContentParams | undefine
|
|
|
472
519
|
declare function createUiContentParamsWindowName(params: UiContentParams | undefined): string | undefined;
|
|
473
520
|
declare function appendUiContentParamsBootstrapQuery(url: string, params: UiContentParams | undefined): string;
|
|
474
521
|
//#endregion
|
|
475
|
-
export { type AgentRunSendIngressPayload, type AgentRunSessionMaterializationMetadata, type AgentRunSessionMessageRequestPayload, type AppEvent, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type AppEventSource, CHAT_INLINE_TOKENS_METADATA_KEY, CHAT_INLINE_TOKENS_SCHEMA_VERSION, CHAT_PROJECT_TOKEN_KIND, CHAT_SESSION_MATERIALIZATION_METADATA_KEY, CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND, CHAT_WORKSPACE_FILE_TOKEN_KIND, type ChatInlineTokenMetadata, type ChatInlineTokensMetadata, type ChatProjectInlineTokenMetadata, type ChatSkillInlineTokenMetadata, type ChatSkillSource, type ChatWorkspaceInlineTokenMetadata, type Cleanup, type Disposable, DisposableOwner, DisposableStore, EventBus, type EventBusOptions, type EventEmitOptions, type EventEnvelope, type EventHandler, type EventKey, type EventSource, type ExtensionChannelCommandExecuteIngressPayload, type ExtensionChannelCommandExecuteResponse, type ExtensionChannelCommandListIngressPayload, type ExtensionChannelCommandListResponse, type ExtensionChannelCommandOption, type ExtensionChannelCommandOptionType, type ExtensionChannelCommandSpec, type ExtensionChannelConfigGetIngressPayload, type ExtensionChannelFileContent, type ExtensionChannelImageContent, type ExtensionChannelMessageContent, type ExtensionChannelMessageSubmitIngressPayload, type ExtensionChannelSubmittedAttachment, type ExtensionChannelTextContent, type ExtensionResponseIngressPayload, INBOX_DELIVERY_SESSION_METADATA_KEY, type InboxDelivery, type InboxDeliveryChangedEventPayload, type InboxDeliveryContentType, type InboxDeliveryContinueResult, type InboxDeliveryListView, type InboxDeliverySource, type InboxDeliveryStateAction, type InboxDeliveryStateUpdate, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, type InstallationKind, type Key, PANEL_APP_INLINE_HOST_CONTRACT, RUNTIME_DEFAULT_MODEL_VALUE, type RuntimeModelSelectionMode, SILENT_REPLY_TOKEN, type TypedKey, UI_CONTENT_PARAMS_HOST_CONTRACT, type UiContentParamValue, type UiContentParams, UiContentParamsError, type UiShowContentEventPayload, type UiShowContentFileViewer, type UiShowContentPlacement, type UiShowContentPurpose, type UiShowContentTarget, type Unsubscribe, type UpdateBlockReason, type UpdateFailureStage, type UpdateProgress, type UpdateSnapshot, type UpdateStatus, appendUiContentParamsBootstrapQuery, containsSilentReplyMarker, createAppEventKey, createEventKey, createTypedKey, createUiContentParamsWindowName, eventKeys, getKeyId, ingressKeys, isRuntimeDefaultModelValue, isSilentReplyNcpMessage, normalizeRuntimeModelSelectionMode, readInlineContentHeight, readUiContentParams, toDisposable };
|
|
522
|
+
export { type AgentRunContinueIngressPayload, type AgentRunEditMessageIngressPayload, type AgentRunSendIngressPayload, type AgentRunSessionMaterializationMetadata, type AgentRunSessionMessageRequestPayload, type AppEvent, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type AppEventSource, CHAT_CONTINUATION_TARGET_MESSAGE_METADATA_KEY, CHAT_CONVERSATION_EXCERPT_TOKEN_KIND, CHAT_INLINE_TOKENS_METADATA_KEY, CHAT_INLINE_TOKENS_SCHEMA_VERSION, CHAT_PROJECT_TOKEN_KIND, CHAT_SESSION_MATERIALIZATION_METADATA_KEY, CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND, CHAT_WORKSPACE_EXCERPT_TOKEN_KIND, CHAT_WORKSPACE_FILE_TOKEN_KIND, type ChatConversationExcerptInlineTokenMetadata, type ChatInlineTokenMetadata, type ChatInlineTokensMetadata, type ChatProjectInlineTokenMetadata, type ChatSkillInlineTokenMetadata, type ChatSkillSource, type ChatWorkspaceExcerptInlineTokenMetadata, type ChatWorkspaceInlineTokenMetadata, type Cleanup, type Disposable, DisposableOwner, DisposableStore, EventBus, type EventBusOptions, type EventEmitOptions, type EventEnvelope, type EventHandler, type EventKey, type EventSource, type ExtensionChannelCommandExecuteIngressPayload, type ExtensionChannelCommandExecuteResponse, type ExtensionChannelCommandListIngressPayload, type ExtensionChannelCommandListResponse, type ExtensionChannelCommandOption, type ExtensionChannelCommandOptionType, type ExtensionChannelCommandSpec, type ExtensionChannelConfigGetIngressPayload, type ExtensionChannelFileContent, type ExtensionChannelImageContent, type ExtensionChannelMessageContent, type ExtensionChannelMessageSubmitIngressPayload, type ExtensionChannelSubmittedAttachment, type ExtensionChannelTextContent, type ExtensionResponseIngressPayload, type ExtensionRuntimeReadyIngressPayload, INBOX_DELIVERY_SESSION_METADATA_KEY, type InboxDelivery, type InboxDeliveryChangedEventPayload, type InboxDeliveryContentType, type InboxDeliveryContinueResult, type InboxDeliveryListView, type InboxDeliverySource, type InboxDeliveryStateAction, type InboxDeliveryStateUpdate, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, type InstallationKind, type Key, PANEL_APP_INLINE_HOST_CONTRACT, PANEL_APP_SCROLL_RESTORATION_CONTRACT, RUNTIME_DEFAULT_MODEL_VALUE, type RuntimeModelSelectionMode, SILENT_REPLY_TOKEN, type TypedKey, UI_CONTENT_PARAMS_HOST_CONTRACT, type UiContentParamValue, type UiContentParams, UiContentParamsError, type UiShowContentEventPayload, type UiShowContentFileViewer, type UiShowContentPlacement, type UiShowContentPurpose, type UiShowContentTarget, type Unsubscribe, type UpdateBlockReason, type UpdateFailureStage, type UpdateProgress, type UpdateSnapshot, type UpdateStatus, appendUiContentParamsBootstrapQuery, containsSilentReplyMarker, createAppEventKey, createEventKey, createTypedKey, createUiContentParamsWindowName, eventKeys, getKeyId, ingressKeys, isRuntimeDefaultModelValue, isSilentReplyNcpMessage, normalizeRuntimeModelSelectionMode, readInlineContentHeight, readUiContentParams, toDisposable };
|
|
476
523
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/typed-key.types.ts","../src/types/event-bus.types.ts","../src/services/event-bus.service.ts","../src/services/ingress.service.ts","../src/services/disposable.service.ts","../src/types/ui-show-content.types.ts","../src/types/inbox-delivery.types.ts","../src/types/update.types.ts","../src/configs/event-keys.config.ts","../src/configs/ingress-keys.config.ts","../src/configs/runtime-model.config.ts","../src/configs/chat-composer-token.config.ts","../src/configs/panel-app-inline-host.config.ts","../src/utils/inline-content-height.utils.ts","../src/utils/silent-reply.utils.ts","../src/utils/ui-content-params.utils.ts"],"mappings":";;;KAAY,QAAA;EAAA,SACD,EAAA;EAAA,SACA,KAAA,GAAQ,CAAA;AAAA;AAAA,KAGP,GAAA,gBAAmB,QAAA,CAAS,CAAA;AAAA,iBAExB,cAAA,GAAA,CAAkB,EAAA,WAAa,QAAA,CAAS,CAAA;AAAA,iBAQxC,QAAA,CAAS,GAAA,EAAK,GAAA;;;KCblB,QAAA,MAAc,QAAA,CAAS,CAAA;AAAA,KAEvB,WAAA;AAAA,KAEA,aAAA;EACV,IAAA;EACA,OAAA,EAAS,CAAA;EACT,SAAA;EACA,MAAA,GAAS,WAAA;AAAA;AAAA,KAGC,gBAAA;EACV,S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GAAA,CAAI,QAAA;EACV,WAAA;EACA,OAAA,GAAU,QAAA;EACV,MAAA;AAAA;AAAA,KAGU,cAAA;EACV,MAAA;EACA,KAAA;AAAA;AAAA,KAGU,cAAA,2CACV,QAAA,EAAU,eAAA,CAAgB,QAAA,GAC1B,OAAA,EAAS,cAAA,KACN,OAAA,CAAQ,OAAA,IAAW,OAAA;AAAA,cAEX,OAAA;EAAA,iBACM,QAAA;EAAA,SAER,UAAA,0CACP,IAAA,EAAM,GAAA,CAAI,QAAA,GACV,OAAA,EAAS,cAAA,CAAe,QAAA,EAAU,OAAA;EAAA,SAc3B,MAAA,0CACP,QAAA,EAAU,eAAA,CAAgB,QAAA,GAC1B,OAAA,EAAS,cAAA,KACR,OAAA,CAAQ,OAAA;AAAA;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/typed-key.types.ts","../src/types/event-bus.types.ts","../src/services/event-bus.service.ts","../src/services/ingress.service.ts","../src/services/disposable.service.ts","../src/types/ui-show-content.types.ts","../src/types/inbox-delivery.types.ts","../src/types/update.types.ts","../src/configs/event-keys.config.ts","../src/configs/ingress-keys.config.ts","../src/configs/runtime-model.config.ts","../src/configs/chat-composer-token.config.ts","../src/configs/panel-app-inline-host.config.ts","../src/configs/panel-app-scroll-restoration.config.ts","../src/utils/inline-content-height.utils.ts","../src/utils/silent-reply.utils.ts","../src/utils/ui-content-params.utils.ts"],"mappings":";;;KAAY,QAAA;EAAA,SACD,EAAA;EAAA,SACA,KAAA,GAAQ,CAAA;AAAA;AAAA,KAGP,GAAA,gBAAmB,QAAA,CAAS,CAAA;AAAA,iBAExB,cAAA,GAAA,CAAkB,EAAA,WAAa,QAAA,CAAS,CAAA;AAAA,iBAQxC,QAAA,CAAS,GAAA,EAAK,GAAA;;;KCblB,QAAA,MAAc,QAAA,CAAS,CAAA;AAAA,KAEvB,WAAA;AAAA,KAEA,aAAA;EACV,IAAA;EACA,OAAA,EAAS,CAAA;EACT,SAAA;EACA,MAA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A"}
|
package/dist/index.js
CHANGED
|
@@ -226,17 +226,21 @@ const eventKeys = {
|
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region src/configs/ingress-keys.config.ts
|
|
228
228
|
const CHAT_SESSION_MATERIALIZATION_METADATA_KEY = "session_materialization";
|
|
229
|
+
const CHAT_CONTINUATION_TARGET_MESSAGE_METADATA_KEY = "chat_continuation_target_message_id";
|
|
229
230
|
const ingressKeys = {
|
|
230
231
|
extension: {
|
|
231
232
|
channelConfigGet: createTypedKey("extension.channel.config.get"),
|
|
232
233
|
channelMessageSubmit: createTypedKey("extension.channel.message.submit"),
|
|
233
234
|
channelCommandList: createTypedKey("extension.channel.command.list"),
|
|
234
235
|
channelCommandExecute: createTypedKey("extension.channel.command.execute"),
|
|
236
|
+
runtimeReady: createTypedKey("extension.runtime.ready"),
|
|
235
237
|
response: createTypedKey("extension.response")
|
|
236
238
|
},
|
|
237
239
|
agentRun: {
|
|
238
240
|
send: createTypedKey("agent-run.send"),
|
|
239
241
|
abort: createTypedKey("agent-run.abort"),
|
|
242
|
+
editMessage: createTypedKey("agent-run.edit-message"),
|
|
243
|
+
continue: createTypedKey("agent-run.continue"),
|
|
240
244
|
sessionMessageRequest: createTypedKey("agent-run.session-message.request")
|
|
241
245
|
}
|
|
242
246
|
};
|
|
@@ -255,8 +259,10 @@ function normalizeRuntimeModelSelectionMode(value) {
|
|
|
255
259
|
const CHAT_INLINE_TOKENS_METADATA_KEY = "ui_inline_tokens";
|
|
256
260
|
const CHAT_INLINE_TOKENS_SCHEMA_VERSION = 2;
|
|
257
261
|
const CHAT_PROJECT_TOKEN_KIND = "project";
|
|
262
|
+
const CHAT_CONVERSATION_EXCERPT_TOKEN_KIND = "conversation_excerpt";
|
|
258
263
|
const CHAT_WORKSPACE_FILE_TOKEN_KIND = "workspace_file";
|
|
259
264
|
const CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND = "workspace_directory";
|
|
265
|
+
const CHAT_WORKSPACE_EXCERPT_TOKEN_KIND = "workspace_excerpt";
|
|
260
266
|
//#endregion
|
|
261
267
|
//#region src/configs/panel-app-inline-host.config.ts
|
|
262
268
|
const PANEL_APP_INLINE_HOST_CONTRACT = {
|
|
@@ -267,6 +273,13 @@ const PANEL_APP_INLINE_HOST_CONTRACT = {
|
|
|
267
273
|
placementSearchParam: "nextclawPlacement"
|
|
268
274
|
};
|
|
269
275
|
//#endregion
|
|
276
|
+
//#region src/configs/panel-app-scroll-restoration.config.ts
|
|
277
|
+
const PANEL_APP_SCROLL_RESTORATION_CONTRACT = {
|
|
278
|
+
restoreScrollMessageType: "nextclaw:panel-app-restore-scroll",
|
|
279
|
+
scrollMessageType: "nextclaw:panel-app-scroll",
|
|
280
|
+
version: 1
|
|
281
|
+
};
|
|
282
|
+
//#endregion
|
|
270
283
|
//#region src/utils/inline-content-height.utils.ts
|
|
271
284
|
function readInlineContentHeight(body, documentElement) {
|
|
272
285
|
return Math.ceil(Math.max(body?.clientHeight ?? 0, body?.offsetHeight ?? 0, body?.scrollHeight ?? 0, documentElement.offsetHeight));
|
|
@@ -336,6 +349,6 @@ function appendUiContentParamsBootstrapQuery(url, params) {
|
|
|
336
349
|
return `${pathname}?${query.toString()}${typeof hash === "string" ? `#${hash}` : ""}`;
|
|
337
350
|
}
|
|
338
351
|
//#endregion
|
|
339
|
-
export { CHAT_INLINE_TOKENS_METADATA_KEY, CHAT_INLINE_TOKENS_SCHEMA_VERSION, CHAT_PROJECT_TOKEN_KIND, CHAT_SESSION_MATERIALIZATION_METADATA_KEY, CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND, CHAT_WORKSPACE_FILE_TOKEN_KIND, DisposableOwner, DisposableStore, EventBus, INBOX_DELIVERY_SESSION_METADATA_KEY, Ingress, PANEL_APP_INLINE_HOST_CONTRACT, RUNTIME_DEFAULT_MODEL_VALUE, SILENT_REPLY_TOKEN, UI_CONTENT_PARAMS_HOST_CONTRACT, UiContentParamsError, appendUiContentParamsBootstrapQuery, containsSilentReplyMarker, createAppEventKey, createEventKey, createTypedKey, createUiContentParamsWindowName, eventKeys, getKeyId, ingressKeys, isRuntimeDefaultModelValue, isSilentReplyNcpMessage, normalizeRuntimeModelSelectionMode, readInlineContentHeight, readUiContentParams, toDisposable };
|
|
352
|
+
export { CHAT_CONTINUATION_TARGET_MESSAGE_METADATA_KEY, CHAT_CONVERSATION_EXCERPT_TOKEN_KIND, CHAT_INLINE_TOKENS_METADATA_KEY, CHAT_INLINE_TOKENS_SCHEMA_VERSION, CHAT_PROJECT_TOKEN_KIND, CHAT_SESSION_MATERIALIZATION_METADATA_KEY, CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND, CHAT_WORKSPACE_EXCERPT_TOKEN_KIND, CHAT_WORKSPACE_FILE_TOKEN_KIND, DisposableOwner, DisposableStore, EventBus, INBOX_DELIVERY_SESSION_METADATA_KEY, Ingress, PANEL_APP_INLINE_HOST_CONTRACT, PANEL_APP_SCROLL_RESTORATION_CONTRACT, RUNTIME_DEFAULT_MODEL_VALUE, SILENT_REPLY_TOKEN, UI_CONTENT_PARAMS_HOST_CONTRACT, UiContentParamsError, appendUiContentParamsBootstrapQuery, containsSilentReplyMarker, createAppEventKey, createEventKey, createTypedKey, createUiContentParamsWindowName, eventKeys, getKeyId, ingressKeys, isRuntimeDefaultModelValue, isSilentReplyNcpMessage, normalizeRuntimeModelSelectionMode, readInlineContentHeight, readUiContentParams, toDisposable };
|
|
340
353
|
|
|
341
354
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/types/typed-key.types.ts","../src/services/event-bus.service.ts","../src/services/ingress.service.ts","../src/services/disposable.service.ts","../src/types/inbox-delivery.types.ts","../src/configs/event-keys.config.ts","../src/configs/ingress-keys.config.ts","../src/configs/runtime-model.config.ts","../src/configs/chat-composer-token.config.ts","../src/configs/panel-app-inline-host.config.ts","../src/utils/inline-content-height.utils.ts","../src/utils/silent-reply.utils.ts","../src/utils/ui-content-params.utils.ts"],"sourcesContent":["export type TypedKey<T = unknown> = {\n readonly id: string;\n readonly _type?: T;\n};\n\nexport type Key<T = unknown> = TypedKey<T> | string;\n\nexport function createTypedKey<T>(id: string): TypedKey<T> {\n const normalizedId = id.trim();\n if (!normalizedId) {\n throw new Error(\"typed key id is required\");\n }\n return { id: normalizedId };\n}\n\nexport function getKeyId(key: Key<unknown>): string {\n return typeof key === \"string\" ? key.trim() : key.id;\n}\n","import type {\n AppEventEmitOptions,\n AppEventEnvelope,\n AppEventHandler,\n AppEventKey,\n EventBusOptions,\n Unsubscribe,\n} from \"../types/event-bus.types.js\";\nimport { getKeyId, type Key } from \"../types/typed-key.types.js\";\n\nexport class EventBus {\n private readonly listeners = new Map<string, Set<AppEventHandler<unknown>>>();\n private readonly globalListeners = new Set<(event: AppEventEnvelope) => void>();\n private listenerCount = 0;\n private readonly onFirstSubscriber?: EventBusOptions[\"onFirstSubscriber\"];\n private readonly onListenerError?: EventBusOptions[\"onListenerError\"];\n private readonly onNoSubscribers?: EventBusOptions[\"onNoSubscribers\"];\n\n constructor(options: EventBusOptions = {}) {\n this.onFirstSubscriber = options.onFirstSubscriber;\n this.onListenerError = options.onListenerError;\n this.onNoSubscribers = options.onNoSubscribers;\n }\n\n emit = <T>(\n key: Key<T>,\n payload: T,\n options: AppEventEmitOptions = {},\n ): void => {\n const envelope: AppEventEnvelope<T> = {\n type: getKeyId(key),\n payload,\n ...(options.emittedAt ? { emittedAt: options.emittedAt } : {}),\n ...(options.source ? { source: options.source } : {}),\n };\n this.emitEnvelope(envelope);\n };\n\n emitEnvelope = <T>(event: AppEventEnvelope<T>): void => {\n const listeners = this.listeners.get(event.type);\n if (listeners) {\n for (const listener of listeners) {\n this.safeInvokeListener(event, listener as AppEventHandler<T>);\n }\n }\n if (this.globalListeners.size === 0) {\n return;\n }\n for (const listener of this.globalListeners) {\n this.safeInvokeGlobalListener(event, listener);\n }\n };\n\n on = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): Unsubscribe => {\n const keyId = getKeyId(key);\n const listeners = this.listeners.get(keyId) ?? new Set<AppEventHandler<unknown>>();\n const typedHandler = handler as AppEventHandler<unknown>;\n const added = !listeners.has(typedHandler);\n listeners.add(typedHandler);\n this.listeners.set(keyId, listeners);\n if (added) {\n this.registerSubscriber();\n }\n return () => {\n this.off(key, handler);\n };\n };\n\n off = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): void => {\n const keyId = getKeyId(key);\n const listeners = this.listeners.get(keyId);\n if (!listeners) {\n return;\n }\n const deleted = listeners.delete(handler as AppEventHandler<unknown>);\n if (listeners.size === 0) {\n this.listeners.delete(keyId);\n }\n if (deleted) {\n this.unregisterSubscriber();\n }\n };\n\n once = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): Unsubscribe => {\n const wrappedHandler: AppEventHandler<T> = (payload, envelope) => {\n unsubscribe();\n handler(payload, envelope);\n };\n const unsubscribe = this.on(key, wrappedHandler);\n return unsubscribe;\n };\n\n subscribeAll = (handler: (event: AppEventEnvelope) => void): Unsubscribe => {\n const added = !this.globalListeners.has(handler);\n this.globalListeners.add(handler);\n if (added) {\n this.registerSubscriber();\n }\n return () => {\n if (this.globalListeners.delete(handler)) {\n this.unregisterSubscriber();\n }\n };\n };\n\n private registerSubscriber = (): void => {\n this.listenerCount += 1;\n if (this.listenerCount === 1) {\n this.onFirstSubscriber?.();\n }\n };\n\n private unregisterSubscriber = (): void => {\n this.listenerCount = Math.max(0, this.listenerCount - 1);\n if (this.listenerCount === 0) {\n this.onNoSubscribers?.();\n }\n };\n\n private safeInvokeListener = <T>(\n event: AppEventEnvelope<T>,\n listener: AppEventHandler<T>,\n ): void => {\n try {\n listener(event.payload, event);\n } catch (error) {\n this.onListenerError?.({\n type: event.type,\n payload: event.payload,\n error,\n });\n }\n };\n\n private safeInvokeGlobalListener = (\n event: AppEventEnvelope,\n listener: (event: AppEventEnvelope) => void,\n ): void => {\n try {\n listener(event);\n } catch (error) {\n this.onListenerError?.({\n type: event.type,\n payload: event.payload,\n error,\n });\n }\n };\n}\n","import { getKeyId, type Key } from \"../types/typed-key.types.js\";\n\nexport type IngressEnvelope<TPayload = unknown> = {\n type: Key<TPayload>;\n extensionId?: string;\n payload?: TPayload;\n source?: string;\n};\n\nexport type IngressContext = {\n source: string;\n token?: string | null;\n};\n\nexport type IngressHandler<TPayload = unknown, TResult = unknown> = (\n envelope: IngressEnvelope<TPayload>,\n context: IngressContext,\n) => Promise<TResult> | TResult;\n\nexport class Ingress {\n private readonly handlers = new Map<string, IngressHandler<unknown, unknown>>();\n\n readonly addHandler = <TPayload = unknown, TResult = unknown>(\n type: Key<TPayload>,\n handler: IngressHandler<TPayload, TResult>,\n ): (() => void) => {\n const normalizedType = getKeyId(type);\n if (!normalizedType) {\n throw new Error(\"ingress type is required\");\n }\n this.handlers.set(normalizedType, handler as IngressHandler<unknown, unknown>);\n return () => {\n if (this.handlers.get(normalizedType) === handler) {\n this.handlers.delete(normalizedType);\n }\n };\n };\n\n readonly handle = async <TPayload = unknown, TResult = unknown>(\n envelope: IngressEnvelope<TPayload>,\n context: IngressContext,\n ): Promise<TResult> => {\n const normalizedType = getKeyId(envelope.type);\n const handler = this.handlers.get(normalizedType);\n if (!handler) {\n throw new Error(`Unsupported ingress type: ${normalizedType}`);\n }\n return await (handler as IngressHandler<TPayload, TResult>)(envelope, context);\n };\n}\n","export type Cleanup = () => void;\n\nexport type Disposable = {\n dispose: () => void;\n};\n\nconst once = (cleanup: Cleanup): Cleanup => {\n let disposed = false;\n return () => {\n if (disposed) {\n return;\n }\n disposed = true;\n cleanup();\n };\n};\n\nconst runCleanups = (cleanups: Cleanup[]): void => {\n const errors: unknown[] = [];\n for (const cleanup of cleanups) {\n try {\n cleanup();\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length === 1) {\n throw errors[0];\n }\n if (errors.length > 1) {\n throw new AggregateError(errors, \"Failed to run cleanups.\");\n }\n};\n\nexport const toDisposable = (dispose: Cleanup): Disposable => ({\n dispose: once(dispose),\n});\n\nexport abstract class DisposableOwner implements Disposable {\n protected readonly cleanups: Cleanup[] = [];\n private disposed = false;\n\n protected get isDisposed(): boolean {\n return this.disposed;\n }\n\n protected addCleanup = (cleanup: Cleanup): Cleanup => {\n const disposableCleanup = once(cleanup);\n if (this.disposed) {\n disposableCleanup();\n return disposableCleanup;\n }\n this.cleanups.push(disposableCleanup);\n return disposableCleanup;\n };\n\n protected addDisposable = <T extends Disposable>(disposable: T): T => {\n this.addCleanup(() => {\n disposable.dispose();\n });\n return disposable;\n };\n\n dispose = (): void => {\n if (this.disposed) {\n return;\n }\n this.disposed = true;\n const current = this.cleanups.splice(0);\n runCleanups(current.reverse());\n };\n}\n\nexport class DisposableStore implements Disposable {\n private readonly disposables = new Set<Disposable>();\n\n private isDisposed = false;\n\n add = <T extends Disposable>(disposable: T): T => {\n if (this.isDisposed) {\n disposable.dispose();\n return disposable;\n }\n this.disposables.add(disposable);\n return disposable;\n };\n\n clear = (): void => {\n const current = [...this.disposables];\n this.disposables.clear();\n for (const disposable of current.reverse()) {\n disposable.dispose();\n }\n };\n\n dispose = (): void => {\n if (this.isDisposed) {\n return;\n }\n this.isDisposed = true;\n this.clear();\n };\n}\n","export const INBOX_DELIVERY_SESSION_METADATA_KEY = \"inbox_delivery_id\";\n\nexport type InboxDeliveryContentType = \"markdown\" | \"html\";\n\nexport type InboxDeliverySource = {\n kind: \"agent\";\n agentId: string | null;\n sessionId: string | null;\n toolCallId: string | null;\n filePath: string | null;\n};\n\nexport type InboxDelivery = {\n id: string;\n title: string;\n summary: string | null;\n content: string;\n contentType: InboxDeliveryContentType;\n source: InboxDeliverySource;\n createdAt: string;\n updatedAt: string;\n presentedAt: string | null;\n readAt: string | null;\n archivedAt: string | null;\n conversationSessionId: string | null;\n};\n\nexport type InboxDeliveryListView = {\n deliveries: InboxDelivery[];\n total: number;\n unreadCount: number;\n unpresentedCount: number;\n};\n\nexport type InboxDeliveryStateAction =\n | \"present\"\n | \"read\"\n | \"mark_unread\"\n | \"archive\"\n | \"restore\";\n\nexport type InboxDeliveryStateUpdate = {\n action: InboxDeliveryStateAction;\n};\n\nexport type InboxDeliveryContinueResult = {\n delivery: InboxDelivery;\n sessionId: string;\n created: boolean;\n};\n\nexport type InboxDeliveryChangedEventPayload = {\n deliveryId: string;\n operation: \"upsert\" | \"delete\";\n};\n","import type { NcpEndpointEvent, NcpSessionSummary } from \"@nextclaw/ncp\";\nimport type { AppEventKey, EventKey } from \"../types/event-bus.types.js\";\nimport { createTypedKey } from \"../types/typed-key.types.js\";\nimport type { UiShowContentEventPayload } from \"../types/ui-show-content.types.js\";\nimport type { InboxDeliveryChangedEventPayload } from \"../types/inbox-delivery.types.js\";\nimport type { UpdateSnapshot } from \"../types/update.types.js\";\n\nexport function createEventKey<T>(id: string): EventKey<T> {\n return createTypedKey<T>(id);\n}\n\nexport function createAppEventKey<T>(id: string): AppEventKey<T> {\n return createTypedKey<T>(id);\n}\n\nexport const eventKeys = {\n configUpdated: createAppEventKey<{ path: string }>(\"config.updated\"),\n channelConfigApplyStatus: createAppEventKey<{\n channel: string;\n status: \"started\" | \"succeeded\" | \"failed\";\n message?: string;\n }>(\"channel.config.apply-status\"),\n sessionUpdated: createAppEventKey<{ sessionKey: string }>(\"session.updated\"),\n sessionRunStatus: createAppEventKey<{\n sessionKey: string;\n status: \"running\" | \"idle\";\n }>(\"session.run-status\"),\n sessionRunQueueUpdated: createAppEventKey<{ sessionKey: string }>(\n \"session.run-queue.updated\",\n ),\n sessionMetadataChanged: createAppEventKey<{\n metadata: Record<string, unknown>;\n mode: \"set\" | \"update\";\n sessionKey: string;\n }>(\"session.metadata.changed\"),\n ncpEvent: createAppEventKey<NcpEndpointEvent>(\"ncp.event\"),\n sessionSummaryUpsert: createAppEventKey<{ summary: NcpSessionSummary }>(\n \"session.summary.upsert\",\n ),\n sessionSummaryDelete: createAppEventKey<{ sessionKey: string }>(\n \"session.summary.delete\",\n ),\n uiShowContent: createAppEventKey<UiShowContentEventPayload>(\"ui.show-content\"),\n inboxDeliveryChanged: createAppEventKey<InboxDeliveryChangedEventPayload>(\n \"inbox.delivery.changed\",\n ),\n configReloadStarted: createAppEventKey<Record<string, unknown> | undefined>(\n \"config.reload.started\",\n ),\n configReloadFinished: createAppEventKey<Record<string, unknown> | undefined>(\n \"config.reload.finished\",\n ),\n error: createAppEventKey<{ message: string; code?: string }>(\"error\"),\n connectionOpen: createAppEventKey<Record<string, never> | undefined>(\n \"connection.open\",\n ),\n connectionClose: createAppEventKey<Record<string, never> | undefined>(\n \"connection.close\",\n ),\n connectionError: createAppEventKey<{ message?: string } | undefined>(\n \"connection.error\",\n ),\n runtimeUpdateSnapshot: createAppEventKey<UpdateSnapshot>(\n \"runtime.update.snapshot\",\n ),\n} as const;\n","import type {\n NcpAgentSendEnvelope,\n NcpMessage,\n NcpMessageAbortPayload,\n NcpMessagePart,\n} from \"@nextclaw/ncp\";\nimport { createTypedKey } from \"../types/typed-key.types.js\";\n\nexport type ExtensionChannelTextContent = {\n type: \"text\";\n text: string;\n};\n\ntype ExtensionChannelResourceRef = {\n url?: string;\n assetUri?: string;\n mimeType?: string;\n name?: string;\n};\n\nexport type ExtensionChannelImageContent = ExtensionChannelResourceRef & { type: \"image\" };\n\nexport type ExtensionChannelFileContent = ExtensionChannelResourceRef & { type: \"file\" };\n\nexport type ExtensionChannelMessageContent =\n | ExtensionChannelTextContent\n | ExtensionChannelImageContent\n | ExtensionChannelFileContent;\n\nexport type ExtensionChannelSubmittedAttachment = ExtensionChannelResourceRef & {\n id?: string;\n path?: string;\n size?: number;\n source?: string;\n status?: \"ready\" | \"remote-only\";\n errorCode?: \"too_large\" | \"download_failed\" | \"http_error\" | \"invalid_payload\";\n};\n\nexport type ExtensionChannelConfigGetIngressPayload = {\n channelId: string;\n};\n\nexport type ExtensionChannelMessageSubmitIngressPayload = {\n channelId: string;\n conversationId: string;\n senderId: string;\n content: ExtensionChannelMessageContent;\n attachments?: ExtensionChannelSubmittedAttachment[];\n metadata?: Record<string, unknown>;\n};\n\nexport type ExtensionChannelCommandOptionType = \"string\" | \"boolean\" | \"number\";\n\nexport type ExtensionChannelCommandOption = {\n name: string;\n description: string;\n type: ExtensionChannelCommandOptionType;\n required?: boolean;\n};\n\nexport type ExtensionChannelCommandSpec = {\n name: string;\n description: string;\n options?: ExtensionChannelCommandOption[];\n};\n\nexport type ExtensionChannelCommandListIngressPayload = {\n channelId: string;\n};\n\nexport type ExtensionChannelCommandListResponse = {\n commands: ExtensionChannelCommandSpec[];\n};\n\nexport type ExtensionChannelCommandExecuteIngressPayload = {\n channelId: string;\n conversationId: string;\n senderId: string;\n commandName?: string;\n rawText?: string;\n args?: Record<string, unknown>;\n metadata?: Record<string, unknown>;\n};\n\nexport type ExtensionChannelCommandExecuteResponse = {\n content: string;\n ephemeral?: boolean;\n};\n\nexport type ExtensionResponseIngressPayload =\n | {\n requestId: string;\n ok: true;\n data?: unknown;\n }\n | {\n requestId: string;\n ok: false;\n error: {\n message: string;\n };\n };\n\nexport type AgentRunSessionMessageRequestPayload = {\n message: NcpMessage;\n requestId: string;\n sessionId: string;\n};\n\nexport const CHAT_SESSION_MATERIALIZATION_METADATA_KEY = \"session_materialization\";\n\nexport type AgentRunSessionMaterializationMetadata = {\n kind: \"child\";\n parentSessionId: string;\n inheritContext: true;\n};\n\nexport type AgentRunSendIngressMetadata = Record<string, unknown> & {\n agentRuntimeId?: string;\n agentId?: string;\n projectRoot?: string;\n channel?: string;\n model?: string;\n maxTokens?: number;\n thinkingEffort?: string | null;\n chatId?: string;\n accountId?: string;\n senderId?: string;\n sessionKey?: string;\n label?: string;\n [CHAT_SESSION_MATERIALIZATION_METADATA_KEY]?: AgentRunSessionMaterializationMetadata;\n};\n\nexport type AgentRunSendIngressPayload =\n | (Omit<NcpAgentSendEnvelope, \"metadata\"> & {\n content?: never;\n metadata?: AgentRunSendIngressMetadata;\n peerId?: string;\n })\n | (Omit<NcpAgentSendEnvelope, \"message\" | \"metadata\"> & {\n content: NcpMessagePart[];\n metadata?: AgentRunSendIngressMetadata;\n message?: never;\n peerId?: string;\n });\n\nexport const ingressKeys = {\n extension: {\n channelConfigGet: createTypedKey<ExtensionChannelConfigGetIngressPayload>(\n \"extension.channel.config.get\",\n ),\n channelMessageSubmit:\n createTypedKey<ExtensionChannelMessageSubmitIngressPayload>(\n \"extension.channel.message.submit\",\n ),\n channelCommandList: createTypedKey<ExtensionChannelCommandListIngressPayload>(\n \"extension.channel.command.list\",\n ),\n channelCommandExecute:\n createTypedKey<ExtensionChannelCommandExecuteIngressPayload>(\n \"extension.channel.command.execute\",\n ),\n response: createTypedKey<ExtensionResponseIngressPayload>(\"extension.response\"),\n },\n agentRun: {\n send: createTypedKey<AgentRunSendIngressPayload>(\"agent-run.send\"),\n abort: createTypedKey<NcpMessageAbortPayload>(\"agent-run.abort\"),\n sessionMessageRequest:\n createTypedKey<AgentRunSessionMessageRequestPayload>(\n \"agent-run.session-message.request\",\n ),\n },\n} as const;\n","export const RUNTIME_DEFAULT_MODEL_VALUE = \"__nextclaw_runtime_default__\";\n\nexport type RuntimeModelSelectionMode =\n | \"nextclaw\"\n | \"optional\"\n | \"runtime-default\";\n\nexport function isRuntimeDefaultModelValue(value: unknown): boolean {\n return value === RUNTIME_DEFAULT_MODEL_VALUE;\n}\n\nexport function normalizeRuntimeModelSelectionMode(\n value: unknown,\n): RuntimeModelSelectionMode {\n if (value === \"optional\" || value === \"runtime-default\") {\n return value;\n }\n return \"nextclaw\";\n}\n","export const CHAT_INLINE_TOKENS_METADATA_KEY = \"ui_inline_tokens\";\nexport const CHAT_INLINE_TOKENS_SCHEMA_VERSION = 2;\nexport const CHAT_PROJECT_TOKEN_KIND = \"project\";\nexport const CHAT_WORKSPACE_FILE_TOKEN_KIND = \"workspace_file\";\nexport const CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND = \"workspace_directory\";\n\nexport type ChatSkillSource = \"builtin\" | \"global\" | \"project\" | \"workspace\";\n\nexport type ChatSkillInlineTokenMetadata = {\n kind: \"skill\";\n ref: string;\n name: string;\n source: ChatSkillSource;\n path: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatWorkspaceInlineTokenMetadata = {\n kind:\n | typeof CHAT_WORKSPACE_FILE_TOKEN_KIND\n | typeof CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND;\n key: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatProjectInlineTokenMetadata = {\n kind: typeof CHAT_PROJECT_TOKEN_KIND;\n key: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatInlineTokenMetadata =\n | ChatSkillInlineTokenMetadata\n | ChatProjectInlineTokenMetadata\n | ChatWorkspaceInlineTokenMetadata;\n\nexport type ChatInlineTokensMetadata = {\n schemaVersion: typeof CHAT_INLINE_TOKENS_SCHEMA_VERSION;\n items: ChatInlineTokenMetadata[];\n};\n","export const PANEL_APP_INLINE_HOST_CONTRACT = {\n contentHeightMessageType: \"nextclaw:panel-app-content-height\",\n displayMode: \"card\",\n displayModeSearchParam: \"nextclawDisplayMode\",\n placement: \"inline\",\n placementSearchParam: \"nextclawPlacement\",\n} as const;\n","type InlineContentElement = {\n readonly clientHeight: number;\n readonly offsetHeight: number;\n readonly scrollHeight: number;\n};\n\nexport function readInlineContentHeight(\n body: InlineContentElement | null | undefined,\n documentElement: InlineContentElement,\n): number {\n return Math.ceil(\n Math.max(\n body?.clientHeight ?? 0,\n body?.offsetHeight ?? 0,\n body?.scrollHeight ?? 0,\n documentElement.offsetHeight,\n ),\n );\n}\n","import type { NcpMessage } from \"@nextclaw/ncp\";\n\nexport const SILENT_REPLY_TOKEN = \"<noreply/>\";\n\nconst SILENT_REPLY_MARKER_PATTERN = /<\\s*noreply\\s*\\/\\s*>/i;\n\nexport function containsSilentReplyMarker(text: string | null | undefined): boolean {\n return Boolean(text && SILENT_REPLY_MARKER_PATTERN.test(text));\n}\n\nexport function isSilentReplyNcpMessage(message: NcpMessage): boolean {\n return message.role === \"assistant\" && message.parts.some(\n (part) => (part.type === \"text\" || part.type === \"rich-text\") && containsSilentReplyMarker(part.text),\n );\n}\n","import type {\n UiContentParams,\n UiContentParamValue,\n} from \"../types/ui-show-content.types.js\";\n\nexport const UI_CONTENT_PARAMS_HOST_CONTRACT = {\n bootstrapQueryParam: \"nextclawContentParams\",\n bootstrapQueryValue: \"1\",\n maxDepth: 32,\n maxSerializedBytes: 64 * 1024,\n windowNamePrefix: \"nextclaw:content-params:v1:\",\n} as const;\n\nexport class UiContentParamsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UiContentParamsError\";\n }\n}\n\nfunction assertJsonValue(\n value: unknown,\n depth: number,\n ancestors: readonly object[],\n): asserts value is UiContentParamValue {\n if (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"boolean\"\n ) {\n return;\n }\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) {\n throw new UiContentParamsError(\n \"params must contain only finite numbers.\",\n );\n }\n return;\n }\n if (typeof value !== \"object\") {\n throw new UiContentParamsError(\"params must contain only JSON values.\");\n }\n if (depth >= UI_CONTENT_PARAMS_HOST_CONTRACT.maxDepth) {\n throw new UiContentParamsError(\n `params must not exceed ${UI_CONTENT_PARAMS_HOST_CONTRACT.maxDepth} nested levels.`,\n );\n }\n if (ancestors.includes(value)) {\n throw new UiContentParamsError(\n \"params must not contain circular references.\",\n );\n }\n const nextAncestors = [...ancestors, value];\n if (Array.isArray(value)) {\n for (const item of value) {\n assertJsonValue(item, depth + 1, nextAncestors);\n }\n return;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) {\n throw new UiContentParamsError(\"params must contain only plain objects.\");\n }\n for (const item of Object.values(value)) {\n assertJsonValue(item, depth + 1, nextAncestors);\n }\n}\n\nexport function readUiContentParams(\n value: unknown,\n): UiContentParams | undefined {\n if (typeof value === \"undefined\") {\n return undefined;\n }\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new UiContentParamsError(\"params must be a JSON object.\");\n }\n assertJsonValue(value, 0, []);\n const serialized = JSON.stringify(value);\n const byteLength = new TextEncoder().encode(serialized).byteLength;\n if (byteLength > UI_CONTENT_PARAMS_HOST_CONTRACT.maxSerializedBytes) {\n throw new UiContentParamsError(\n `params must not exceed ${UI_CONTENT_PARAMS_HOST_CONTRACT.maxSerializedBytes} serialized bytes.`,\n );\n }\n return value as UiContentParams;\n}\n\nexport function createUiContentParamsWindowName(\n params: UiContentParams | undefined,\n): string | undefined {\n const normalized = readUiContentParams(params);\n return normalized\n ? `${UI_CONTENT_PARAMS_HOST_CONTRACT.windowNamePrefix}${JSON.stringify(normalized)}`\n : undefined;\n}\n\nexport function appendUiContentParamsBootstrapQuery(\n url: string,\n params: UiContentParams | undefined,\n): string {\n if (!readUiContentParams(params)) {\n return url;\n }\n const [withoutHash, hash] = url.split(\"#\", 2);\n const queryStart = withoutHash.indexOf(\"?\");\n const pathname =\n queryStart >= 0 ? withoutHash.slice(0, queryStart) : withoutHash;\n const query = new URLSearchParams(\n queryStart >= 0 ? withoutHash.slice(queryStart + 1) : \"\",\n );\n query.set(\n UI_CONTENT_PARAMS_HOST_CONTRACT.bootstrapQueryParam,\n UI_CONTENT_PARAMS_HOST_CONTRACT.bootstrapQueryValue,\n );\n return `${pathname}?${query.toString()}${\n typeof hash === \"string\" ? `#${hash}` : \"\"\n }`;\n}\n"],"mappings":";AAOA,SAAgB,eAAkB,IAAyB;CACzD,MAAM,eAAe,GAAG,MAAM;AAC9B,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,2BAA2B;AAE7C,QAAO,EAAE,IAAI,cAAc;;AAG7B,SAAgB,SAAS,KAA2B;AAClD,QAAO,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG,IAAI;;;;ACNpD,IAAa,WAAb,MAAsB;CACpB,4BAA6B,IAAI,KAA4C;CAC7E,kCAAmC,IAAI,KAAwC;CAC/E,gBAAwB;CACxB;CACA;CACA;CAEA,YAAY,UAA2B,EAAE,EAAE;AACzC,OAA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"version":3,"file":"index.js","names":[],"sources":["../src/types/typed-key.types.ts","../src/services/event-bus.service.ts","../src/services/ingress.service.ts","../src/services/disposable.service.ts","../src/types/inbox-delivery.types.ts","../src/configs/event-keys.config.ts","../src/configs/ingress-keys.config.ts","../src/configs/runtime-model.config.ts","../src/configs/chat-composer-token.config.ts","../src/configs/panel-app-inline-host.config.ts","../src/configs/panel-app-scroll-restoration.config.ts","../src/utils/inline-content-height.utils.ts","../src/utils/silent-reply.utils.ts","../src/utils/ui-content-params.utils.ts"],"sourcesContent":["export type TypedKey<T = unknown> = {\n readonly id: string;\n readonly _type?: T;\n};\n\nexport type Key<T = unknown> = TypedKey<T> | string;\n\nexport function createTypedKey<T>(id: string): TypedKey<T> {\n const normalizedId = id.trim();\n if (!normalizedId) {\n throw new Error(\"typed key id is required\");\n }\n return { id: normalizedId };\n}\n\nexport function getKeyId(key: Key<unknown>): string {\n return typeof key === \"string\" ? key.trim() : key.id;\n}\n","import type {\n AppEventEmitOptions,\n AppEventEnvelope,\n AppEventHandler,\n AppEventKey,\n EventBusOptions,\n Unsubscribe,\n} from \"../types/event-bus.types.js\";\nimport { getKeyId, type Key } from \"../types/typed-key.types.js\";\n\nexport class EventBus {\n private readonly listeners = new Map<string, Set<AppEventHandler<unknown>>>();\n private readonly globalListeners = new Set<(event: AppEventEnvelope) => void>();\n private listenerCount = 0;\n private readonly onFirstSubscriber?: EventBusOptions[\"onFirstSubscriber\"];\n private readonly onListenerError?: EventBusOptions[\"onListenerError\"];\n private readonly onNoSubscribers?: EventBusOptions[\"onNoSubscribers\"];\n\n constructor(options: EventBusOptions = {}) {\n this.onFirstSubscriber = options.onFirstSubscriber;\n this.onListenerError = options.onListenerError;\n this.onNoSubscribers = options.onNoSubscribers;\n }\n\n emit = <T>(\n key: Key<T>,\n payload: T,\n options: AppEventEmitOptions = {},\n ): void => {\n const envelope: AppEventEnvelope<T> = {\n type: getKeyId(key),\n payload,\n ...(options.emittedAt ? { emittedAt: options.emittedAt } : {}),\n ...(options.source ? { source: options.source } : {}),\n };\n this.emitEnvelope(envelope);\n };\n\n emitEnvelope = <T>(event: AppEventEnvelope<T>): void => {\n const listeners = this.listeners.get(event.type);\n if (listeners) {\n for (const listener of listeners) {\n this.safeInvokeListener(event, listener as AppEventHandler<T>);\n }\n }\n if (this.globalListeners.size === 0) {\n return;\n }\n for (const listener of this.globalListeners) {\n this.safeInvokeGlobalListener(event, listener);\n }\n };\n\n on = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): Unsubscribe => {\n const keyId = getKeyId(key);\n const listeners = this.listeners.get(keyId) ?? new Set<AppEventHandler<unknown>>();\n const typedHandler = handler as AppEventHandler<unknown>;\n const added = !listeners.has(typedHandler);\n listeners.add(typedHandler);\n this.listeners.set(keyId, listeners);\n if (added) {\n this.registerSubscriber();\n }\n return () => {\n this.off(key, handler);\n };\n };\n\n off = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): void => {\n const keyId = getKeyId(key);\n const listeners = this.listeners.get(keyId);\n if (!listeners) {\n return;\n }\n const deleted = listeners.delete(handler as AppEventHandler<unknown>);\n if (listeners.size === 0) {\n this.listeners.delete(keyId);\n }\n if (deleted) {\n this.unregisterSubscriber();\n }\n };\n\n once = <T>(key: AppEventKey<T>, handler: AppEventHandler<T>): Unsubscribe => {\n const wrappedHandler: AppEventHandler<T> = (payload, envelope) => {\n unsubscribe();\n handler(payload, envelope);\n };\n const unsubscribe = this.on(key, wrappedHandler);\n return unsubscribe;\n };\n\n subscribeAll = (handler: (event: AppEventEnvelope) => void): Unsubscribe => {\n const added = !this.globalListeners.has(handler);\n this.globalListeners.add(handler);\n if (added) {\n this.registerSubscriber();\n }\n return () => {\n if (this.globalListeners.delete(handler)) {\n this.unregisterSubscriber();\n }\n };\n };\n\n private registerSubscriber = (): void => {\n this.listenerCount += 1;\n if (this.listenerCount === 1) {\n this.onFirstSubscriber?.();\n }\n };\n\n private unregisterSubscriber = (): void => {\n this.listenerCount = Math.max(0, this.listenerCount - 1);\n if (this.listenerCount === 0) {\n this.onNoSubscribers?.();\n }\n };\n\n private safeInvokeListener = <T>(\n event: AppEventEnvelope<T>,\n listener: AppEventHandler<T>,\n ): void => {\n try {\n listener(event.payload, event);\n } catch (error) {\n this.onListenerError?.({\n type: event.type,\n payload: event.payload,\n error,\n });\n }\n };\n\n private safeInvokeGlobalListener = (\n event: AppEventEnvelope,\n listener: (event: AppEventEnvelope) => void,\n ): void => {\n try {\n listener(event);\n } catch (error) {\n this.onListenerError?.({\n type: event.type,\n payload: event.payload,\n error,\n });\n }\n };\n}\n","import { getKeyId, type Key } from \"../types/typed-key.types.js\";\n\nexport type IngressEnvelope<TPayload = unknown> = {\n type: Key<TPayload>;\n extensionId?: string;\n generation?: string;\n payload?: TPayload;\n source?: string;\n};\n\nexport type IngressContext = {\n source: string;\n token?: string | null;\n};\n\nexport type IngressHandler<TPayload = unknown, TResult = unknown> = (\n envelope: IngressEnvelope<TPayload>,\n context: IngressContext,\n) => Promise<TResult> | TResult;\n\nexport class Ingress {\n private readonly handlers = new Map<string, IngressHandler<unknown, unknown>>();\n\n readonly addHandler = <TPayload = unknown, TResult = unknown>(\n type: Key<TPayload>,\n handler: IngressHandler<TPayload, TResult>,\n ): (() => void) => {\n const normalizedType = getKeyId(type);\n if (!normalizedType) {\n throw new Error(\"ingress type is required\");\n }\n this.handlers.set(normalizedType, handler as IngressHandler<unknown, unknown>);\n return () => {\n if (this.handlers.get(normalizedType) === handler) {\n this.handlers.delete(normalizedType);\n }\n };\n };\n\n readonly handle = async <TPayload = unknown, TResult = unknown>(\n envelope: IngressEnvelope<TPayload>,\n context: IngressContext,\n ): Promise<TResult> => {\n const normalizedType = getKeyId(envelope.type);\n const handler = this.handlers.get(normalizedType);\n if (!handler) {\n throw new Error(`Unsupported ingress type: ${normalizedType}`);\n }\n return await (handler as IngressHandler<TPayload, TResult>)(envelope, context);\n };\n}\n","export type Cleanup = () => void;\n\nexport type Disposable = {\n dispose: () => void;\n};\n\nconst once = (cleanup: Cleanup): Cleanup => {\n let disposed = false;\n return () => {\n if (disposed) {\n return;\n }\n disposed = true;\n cleanup();\n };\n};\n\nconst runCleanups = (cleanups: Cleanup[]): void => {\n const errors: unknown[] = [];\n for (const cleanup of cleanups) {\n try {\n cleanup();\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length === 1) {\n throw errors[0];\n }\n if (errors.length > 1) {\n throw new AggregateError(errors, \"Failed to run cleanups.\");\n }\n};\n\nexport const toDisposable = (dispose: Cleanup): Disposable => ({\n dispose: once(dispose),\n});\n\nexport abstract class DisposableOwner implements Disposable {\n protected readonly cleanups: Cleanup[] = [];\n private disposed = false;\n\n protected get isDisposed(): boolean {\n return this.disposed;\n }\n\n protected addCleanup = (cleanup: Cleanup): Cleanup => {\n const disposableCleanup = once(cleanup);\n if (this.disposed) {\n disposableCleanup();\n return disposableCleanup;\n }\n this.cleanups.push(disposableCleanup);\n return disposableCleanup;\n };\n\n protected addDisposable = <T extends Disposable>(disposable: T): T => {\n this.addCleanup(() => {\n disposable.dispose();\n });\n return disposable;\n };\n\n dispose = (): void => {\n if (this.disposed) {\n return;\n }\n this.disposed = true;\n const current = this.cleanups.splice(0);\n runCleanups(current.reverse());\n };\n}\n\nexport class DisposableStore implements Disposable {\n private readonly disposables = new Set<Disposable>();\n\n private isDisposed = false;\n\n add = <T extends Disposable>(disposable: T): T => {\n if (this.isDisposed) {\n disposable.dispose();\n return disposable;\n }\n this.disposables.add(disposable);\n return disposable;\n };\n\n clear = (): void => {\n const current = [...this.disposables];\n this.disposables.clear();\n for (const disposable of current.reverse()) {\n disposable.dispose();\n }\n };\n\n dispose = (): void => {\n if (this.isDisposed) {\n return;\n }\n this.isDisposed = true;\n this.clear();\n };\n}\n","export const INBOX_DELIVERY_SESSION_METADATA_KEY = \"inbox_delivery_id\";\n\nexport type InboxDeliveryContentType = \"markdown\" | \"html\";\n\nexport type InboxDeliverySource = {\n kind: \"agent\";\n agentId: string | null;\n sessionId: string | null;\n toolCallId: string | null;\n filePath: string | null;\n};\n\nexport type InboxDelivery = {\n id: string;\n title: string;\n summary: string | null;\n content: string;\n contentType: InboxDeliveryContentType;\n source: InboxDeliverySource;\n createdAt: string;\n updatedAt: string;\n presentedAt: string | null;\n readAt: string | null;\n archivedAt: string | null;\n conversationSessionId: string | null;\n};\n\nexport type InboxDeliveryListView = {\n deliveries: InboxDelivery[];\n total: number;\n unreadCount: number;\n unpresentedCount: number;\n};\n\nexport type InboxDeliveryStateAction =\n | \"present\"\n | \"read\"\n | \"mark_unread\"\n | \"archive\"\n | \"restore\";\n\nexport type InboxDeliveryStateUpdate = {\n action: InboxDeliveryStateAction;\n};\n\nexport type InboxDeliveryContinueResult = {\n delivery: InboxDelivery;\n sessionId: string;\n created: boolean;\n};\n\nexport type InboxDeliveryChangedEventPayload = {\n deliveryId: string;\n operation: \"upsert\" | \"delete\";\n};\n","import type { NcpEndpointEvent, NcpSessionSummary } from \"@nextclaw/ncp\";\nimport type { AppEventKey, EventKey } from \"../types/event-bus.types.js\";\nimport { createTypedKey } from \"../types/typed-key.types.js\";\nimport type { UiShowContentEventPayload } from \"../types/ui-show-content.types.js\";\nimport type { InboxDeliveryChangedEventPayload } from \"../types/inbox-delivery.types.js\";\nimport type { UpdateSnapshot } from \"../types/update.types.js\";\n\nexport function createEventKey<T>(id: string): EventKey<T> {\n return createTypedKey<T>(id);\n}\n\nexport function createAppEventKey<T>(id: string): AppEventKey<T> {\n return createTypedKey<T>(id);\n}\n\nexport const eventKeys = {\n configUpdated: createAppEventKey<{ path: string }>(\"config.updated\"),\n channelConfigApplyStatus: createAppEventKey<{\n channel: string;\n status: \"started\" | \"succeeded\" | \"failed\";\n message?: string;\n }>(\"channel.config.apply-status\"),\n sessionUpdated: createAppEventKey<{ sessionKey: string }>(\"session.updated\"),\n sessionRunStatus: createAppEventKey<{\n sessionKey: string;\n status: \"running\" | \"idle\";\n }>(\"session.run-status\"),\n sessionRunQueueUpdated: createAppEventKey<{ sessionKey: string }>(\n \"session.run-queue.updated\",\n ),\n sessionMetadataChanged: createAppEventKey<{\n metadata: Record<string, unknown>;\n mode: \"set\" | \"update\";\n sessionKey: string;\n }>(\"session.metadata.changed\"),\n ncpEvent: createAppEventKey<NcpEndpointEvent>(\"ncp.event\"),\n sessionSummaryUpsert: createAppEventKey<{ summary: NcpSessionSummary }>(\n \"session.summary.upsert\",\n ),\n sessionSummaryDelete: createAppEventKey<{ sessionKey: string }>(\n \"session.summary.delete\",\n ),\n uiShowContent: createAppEventKey<UiShowContentEventPayload>(\"ui.show-content\"),\n inboxDeliveryChanged: createAppEventKey<InboxDeliveryChangedEventPayload>(\n \"inbox.delivery.changed\",\n ),\n configReloadStarted: createAppEventKey<Record<string, unknown> | undefined>(\n \"config.reload.started\",\n ),\n configReloadFinished: createAppEventKey<Record<string, unknown> | undefined>(\n \"config.reload.finished\",\n ),\n error: createAppEventKey<{ message: string; code?: string }>(\"error\"),\n connectionOpen: createAppEventKey<Record<string, never> | undefined>(\n \"connection.open\",\n ),\n connectionClose: createAppEventKey<Record<string, never> | undefined>(\n \"connection.close\",\n ),\n connectionError: createAppEventKey<{ message?: string } | undefined>(\n \"connection.error\",\n ),\n runtimeUpdateSnapshot: createAppEventKey<UpdateSnapshot>(\n \"runtime.update.snapshot\",\n ),\n} as const;\n","import type {\n NcpAgentSendEnvelope,\n NcpMessage,\n NcpMessageAbortPayload,\n NcpMessagePart,\n} from \"@nextclaw/ncp\";\nimport { createTypedKey } from \"../types/typed-key.types.js\";\n\nexport type ExtensionChannelTextContent = {\n type: \"text\";\n text: string;\n};\n\ntype ExtensionChannelResourceRef = {\n url?: string;\n assetUri?: string;\n mimeType?: string;\n name?: string;\n};\n\nexport type ExtensionChannelImageContent = ExtensionChannelResourceRef & { type: \"image\" };\n\nexport type ExtensionChannelFileContent = ExtensionChannelResourceRef & { type: \"file\" };\n\nexport type ExtensionChannelMessageContent =\n | ExtensionChannelTextContent\n | ExtensionChannelImageContent\n | ExtensionChannelFileContent;\n\nexport type ExtensionChannelSubmittedAttachment = ExtensionChannelResourceRef & {\n id?: string;\n path?: string;\n size?: number;\n source?: string;\n status?: \"ready\" | \"remote-only\";\n errorCode?: \"too_large\" | \"download_failed\" | \"http_error\" | \"invalid_payload\";\n};\n\nexport type ExtensionChannelConfigGetIngressPayload = {\n channelId: string;\n};\n\nexport type ExtensionChannelMessageSubmitIngressPayload = {\n channelId: string;\n conversationId: string;\n senderId: string;\n content: ExtensionChannelMessageContent;\n attachments?: ExtensionChannelSubmittedAttachment[];\n metadata?: Record<string, unknown>;\n};\n\nexport type ExtensionChannelCommandOptionType = \"string\" | \"boolean\" | \"number\";\n\nexport type ExtensionChannelCommandOption = {\n name: string;\n description: string;\n type: ExtensionChannelCommandOptionType;\n required?: boolean;\n};\n\nexport type ExtensionChannelCommandSpec = {\n name: string;\n description: string;\n options?: ExtensionChannelCommandOption[];\n};\n\nexport type ExtensionChannelCommandListIngressPayload = {\n channelId: string;\n};\n\nexport type ExtensionChannelCommandListResponse = {\n commands: ExtensionChannelCommandSpec[];\n};\n\nexport type ExtensionChannelCommandExecuteIngressPayload = {\n channelId: string;\n conversationId: string;\n senderId: string;\n commandName?: string;\n rawText?: string;\n args?: Record<string, unknown>;\n metadata?: Record<string, unknown>;\n};\n\nexport type ExtensionChannelCommandExecuteResponse = {\n content: string;\n ephemeral?: boolean;\n};\n\nexport type ExtensionResponseIngressPayload =\n | {\n requestId: string;\n ok: true;\n data?: unknown;\n }\n | {\n requestId: string;\n ok: false;\n error: {\n message: string;\n };\n };\n\nexport type ExtensionRuntimeReadyIngressPayload = {\n generation: string;\n pid: number;\n};\n\nexport type AgentRunSessionMessageRequestPayload = {\n message: NcpMessage;\n requestId: string;\n sessionId: string;\n};\n\nexport const CHAT_SESSION_MATERIALIZATION_METADATA_KEY = \"session_materialization\";\nexport const CHAT_CONTINUATION_TARGET_MESSAGE_METADATA_KEY =\n \"chat_continuation_target_message_id\";\n\nexport type AgentRunSessionMaterializationMetadata = {\n kind: \"child\";\n parentSessionId: string;\n inheritContext: true;\n};\n\nexport type AgentRunEditMessageIngressPayload = {\n correlationId?: string;\n message: NcpMessage;\n messageId: string;\n sessionId: string;\n};\n\nexport type AgentRunContinueIngressPayload = {\n correlationId?: string;\n sessionId: string;\n};\n\nexport type AgentRunSendIngressMetadata = Record<string, unknown> & {\n agentRuntimeId?: string;\n agentId?: string;\n projectRoot?: string;\n channel?: string;\n model?: string;\n maxTokens?: number;\n thinkingEffort?: string | null;\n chatId?: string;\n accountId?: string;\n senderId?: string;\n sessionKey?: string;\n label?: string;\n [CHAT_SESSION_MATERIALIZATION_METADATA_KEY]?: AgentRunSessionMaterializationMetadata;\n};\n\nexport type AgentRunSendIngressPayload =\n | (Omit<NcpAgentSendEnvelope, \"metadata\"> & {\n content?: never;\n metadata?: AgentRunSendIngressMetadata;\n peerId?: string;\n })\n | (Omit<NcpAgentSendEnvelope, \"message\" | \"metadata\"> & {\n content: NcpMessagePart[];\n metadata?: AgentRunSendIngressMetadata;\n message?: never;\n peerId?: string;\n });\n\nexport const ingressKeys = {\n extension: {\n channelConfigGet: createTypedKey<ExtensionChannelConfigGetIngressPayload>(\n \"extension.channel.config.get\",\n ),\n channelMessageSubmit:\n createTypedKey<ExtensionChannelMessageSubmitIngressPayload>(\n \"extension.channel.message.submit\",\n ),\n channelCommandList: createTypedKey<ExtensionChannelCommandListIngressPayload>(\n \"extension.channel.command.list\",\n ),\n channelCommandExecute:\n createTypedKey<ExtensionChannelCommandExecuteIngressPayload>(\n \"extension.channel.command.execute\",\n ),\n runtimeReady: createTypedKey<ExtensionRuntimeReadyIngressPayload>(\n \"extension.runtime.ready\",\n ),\n response: createTypedKey<ExtensionResponseIngressPayload>(\"extension.response\"),\n },\n agentRun: {\n send: createTypedKey<AgentRunSendIngressPayload>(\"agent-run.send\"),\n abort: createTypedKey<NcpMessageAbortPayload>(\"agent-run.abort\"),\n editMessage: createTypedKey<AgentRunEditMessageIngressPayload>(\n \"agent-run.edit-message\",\n ),\n continue: createTypedKey<AgentRunContinueIngressPayload>(\n \"agent-run.continue\",\n ),\n sessionMessageRequest:\n createTypedKey<AgentRunSessionMessageRequestPayload>(\n \"agent-run.session-message.request\",\n ),\n },\n} as const;\n","export const RUNTIME_DEFAULT_MODEL_VALUE = \"__nextclaw_runtime_default__\";\n\nexport type RuntimeModelSelectionMode =\n | \"nextclaw\"\n | \"optional\"\n | \"runtime-default\";\n\nexport function isRuntimeDefaultModelValue(value: unknown): boolean {\n return value === RUNTIME_DEFAULT_MODEL_VALUE;\n}\n\nexport function normalizeRuntimeModelSelectionMode(\n value: unknown,\n): RuntimeModelSelectionMode {\n if (value === \"optional\" || value === \"runtime-default\") {\n return value;\n }\n return \"nextclaw\";\n}\n","export const CHAT_INLINE_TOKENS_METADATA_KEY = \"ui_inline_tokens\";\nexport const CHAT_INLINE_TOKENS_SCHEMA_VERSION = 2;\nexport const CHAT_PROJECT_TOKEN_KIND = \"project\";\nexport const CHAT_CONVERSATION_EXCERPT_TOKEN_KIND = \"conversation_excerpt\";\nexport const CHAT_WORKSPACE_FILE_TOKEN_KIND = \"workspace_file\";\nexport const CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND = \"workspace_directory\";\nexport const CHAT_WORKSPACE_EXCERPT_TOKEN_KIND = \"workspace_excerpt\";\n\nexport type ChatSkillSource = \"builtin\" | \"global\" | \"project\" | \"workspace\";\n\nexport type ChatSkillInlineTokenMetadata = {\n kind: \"skill\";\n ref: string;\n name: string;\n source: ChatSkillSource;\n path: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatWorkspaceInlineTokenMetadata = {\n kind:\n | typeof CHAT_WORKSPACE_FILE_TOKEN_KIND\n | typeof CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND;\n key: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatWorkspaceExcerptInlineTokenMetadata = {\n kind: typeof CHAT_WORKSPACE_EXCERPT_TOKEN_KIND;\n key: string;\n path: string;\n label: string;\n excerpt: string;\n startLine: number | null;\n endLine: number | null;\n rawText: string;\n};\n\nexport type ChatConversationExcerptInlineTokenMetadata = {\n kind: typeof CHAT_CONVERSATION_EXCERPT_TOKEN_KIND;\n key: string;\n messageId: string;\n role: \"assistant\" | \"user\";\n label: string;\n excerpt: string;\n rawText: string;\n};\n\nexport type ChatProjectInlineTokenMetadata = {\n kind: typeof CHAT_PROJECT_TOKEN_KIND;\n key: string;\n label: string;\n rawText: string;\n};\n\nexport type ChatInlineTokenMetadata =\n | ChatSkillInlineTokenMetadata\n | ChatProjectInlineTokenMetadata\n | ChatWorkspaceInlineTokenMetadata\n | ChatWorkspaceExcerptInlineTokenMetadata\n | ChatConversationExcerptInlineTokenMetadata;\n\nexport type ChatInlineTokensMetadata = {\n schemaVersion: typeof CHAT_INLINE_TOKENS_SCHEMA_VERSION;\n items: ChatInlineTokenMetadata[];\n};\n","export const PANEL_APP_INLINE_HOST_CONTRACT = {\n contentHeightMessageType: \"nextclaw:panel-app-content-height\",\n displayMode: \"card\",\n displayModeSearchParam: \"nextclawDisplayMode\",\n placement: \"inline\",\n placementSearchParam: \"nextclawPlacement\",\n} as const;\n","export const PANEL_APP_SCROLL_RESTORATION_CONTRACT = {\n restoreScrollMessageType: 'nextclaw:panel-app-restore-scroll',\n scrollMessageType: 'nextclaw:panel-app-scroll',\n version: 1,\n} as const;\n","type InlineContentElement = {\n readonly clientHeight: number;\n readonly offsetHeight: number;\n readonly scrollHeight: number;\n};\n\nexport function readInlineContentHeight(\n body: InlineContentElement | null | undefined,\n documentElement: InlineContentElement,\n): number {\n return Math.ceil(\n Math.max(\n body?.clientHeight ?? 0,\n body?.offsetHeight ?? 0,\n body?.scrollHeight ?? 0,\n documentElement.offsetHeight,\n ),\n );\n}\n","import type { NcpMessage } from \"@nextclaw/ncp\";\n\nexport const SILENT_REPLY_TOKEN = \"<noreply/>\";\n\nconst SILENT_REPLY_MARKER_PATTERN = /<\\s*noreply\\s*\\/\\s*>/i;\n\nexport function containsSilentReplyMarker(text: string | null | undefined): boolean {\n return Boolean(text && SILENT_REPLY_MARKER_PATTERN.test(text));\n}\n\nexport function isSilentReplyNcpMessage(message: NcpMessage): boolean {\n return message.role === \"assistant\" && message.parts.some(\n (part) => (part.type === \"text\" || part.type === \"rich-text\") && containsSilentReplyMarker(part.text),\n );\n}\n","import type {\n UiContentParams,\n UiContentParamValue,\n} from \"../types/ui-show-content.types.js\";\n\nexport const UI_CONTENT_PARAMS_HOST_CONTRACT = {\n bootstrapQueryParam: \"nextclawContentParams\",\n bootstrapQueryValue: \"1\",\n maxDepth: 32,\n maxSerializedBytes: 64 * 1024,\n windowNamePrefix: \"nextclaw:content-params:v1:\",\n} as const;\n\nexport class UiContentParamsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UiContentParamsError\";\n }\n}\n\nfunction assertJsonValue(\n value: unknown,\n depth: number,\n ancestors: readonly object[],\n): asserts value is UiContentParamValue {\n if (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"boolean\"\n ) {\n return;\n }\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) {\n throw new UiContentParamsError(\n \"params must contain only finite numbers.\",\n );\n }\n return;\n }\n if (typeof value !== \"object\") {\n throw new UiContentParamsError(\"params must contain only JSON values.\");\n }\n if (depth >= UI_CONTENT_PARAMS_HOST_CONTRACT.maxDepth) {\n throw new UiContentParamsError(\n `params must not exceed ${UI_CONTENT_PARAMS_HOST_CONTRACT.maxDepth} nested levels.`,\n );\n }\n if (ancestors.includes(value)) {\n throw new UiContentParamsError(\n \"params must not contain circular references.\",\n );\n }\n const nextAncestors = [...ancestors, value];\n if (Array.isArray(value)) {\n for (const item of value) {\n assertJsonValue(item, depth + 1, nextAncestors);\n }\n return;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) {\n throw new UiContentParamsError(\"params must contain only plain objects.\");\n }\n for (const item of Object.values(value)) {\n assertJsonValue(item, depth + 1, nextAncestors);\n }\n}\n\nexport function readUiContentParams(\n value: unknown,\n): UiContentParams | undefined {\n if (typeof value === \"undefined\") {\n return undefined;\n }\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new UiContentParamsError(\"params must be a JSON object.\");\n }\n assertJsonValue(value, 0, []);\n const serialized = JSON.stringify(value);\n const byteLength = new TextEncoder().encode(serialized).byteLength;\n if (byteLength > UI_CONTENT_PARAMS_HOST_CONTRACT.maxSerializedBytes) {\n throw new UiContentParamsError(\n `params must not exceed ${UI_CONTENT_PARAMS_HOST_CONTRACT.maxSerializedBytes} serialized bytes.`,\n );\n }\n return value as UiContentParams;\n}\n\nexport function createUiContentParamsWindowName(\n params: UiContentParams | undefined,\n): string | undefined {\n const normalized = readUiContentParams(params);\n return normalized\n ? `${UI_CONTENT_PARAMS_HOST_CONTRACT.windowNamePrefix}${JSON.stringify(normalized)}`\n : undefined;\n}\n\nexport function appendUiContentParamsBootstrapQuery(\n url: string,\n params: UiContentParams | undefined,\n): string {\n if (!readUiContentParams(params)) {\n return url;\n }\n const [withoutHash, hash] = url.split(\"#\", 2);\n const queryStart = withoutHash.indexOf(\"?\");\n const pathname =\n queryStart >= 0 ? withoutHash.slice(0, queryStart) : withoutHash;\n const query = new URLSearchParams(\n queryStart >= 0 ? withoutHash.slice(queryStart + 1) : \"\",\n );\n query.set(\n UI_CONTENT_PARAMS_HOST_CONTRACT.bootstrapQueryParam,\n UI_CONTENT_PARAMS_HOST_CONTRACT.bootstrapQueryValue,\n );\n return `${pathname}?${query.toString()}${\n typeof hash === \"string\" ? `#${hash}` : \"\"\n }`;\n}\n"],"mappings":";AAOA,SAAgB,eAAkB,IAAyB;CACzD,MAAM,eAAe,GAAG,MAAM;AAC9B,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,2BAA2B;AAE7C,QAAO,EAAE,IAAI,cAAc;;AAG7B,SAAgB,SAAS,KAA2B;AAClD,QAAO,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG,IAAI;;;;ACNpD,IAAa,WAAb,MAAsB;CACpB,4BAA6B,IAA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,YAAY,QAAQ,IAAI;CAC3C,MAAM,WACJ,cAAc,IAAI,YAAY,MAAM,GAAG,WAAW,GAAG;CACvD,MAAM,QAAQ,IAAI,gBAChB,cAAc,IAAI,YAAY,MAAM,aAAa,EAAE,GAAG,GACvD;AACD,OAAM,IACJ,gCAAgC,qBAChC,gCAAgC,oBACjC;AACD,QAAO,GAAG,SAAS,GAAG,MAAM,UAAU,GACpC,OAAO,SAAS,WAAW,IAAI,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/shared",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared lightweight primitives and contracts for NextClaw packages.",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@nextclaw/ncp": "0.7.
|
|
18
|
+
"@nextclaw/ncp": "0.7.16"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.17.6",
|