shennian 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/publish-build-manifest.json +165 -125
- package/dist/src/agents/acp/adapter.js +2 -2
- package/dist/src/agents/acp/capability-cache.js +2 -2
- package/dist/src/agents/acp/catalog.js +2 -2
- package/dist/src/agents/acp/manifests.js +2 -2
- package/dist/src/agents/claude.js +8 -6
- package/dist/src/agents/codex.js +2 -2
- package/dist/src/agents/command-spec.js +4 -4
- package/dist/src/agents/cursor.js +1 -1
- package/dist/src/agents/custom-recovery-conformance.js +2 -2
- package/dist/src/agents/gemini.js +1 -1
- package/dist/src/agents/model-registry/discovery.js +3 -3
- package/dist/src/agents/model-registry/service.js +1 -1
- package/dist/src/agents/model-registry.js +1 -1
- package/dist/src/agents/openclaw.js +2 -2
- package/dist/src/agents/opencode.js +1 -1
- package/dist/src/agents/pi-coding-agent.js +3 -4
- package/dist/src/agents/pi-session-ownership.js +2 -2
- package/dist/src/agents/spawn-errors.js +1 -0
- package/dist/src/agents/windows-agent-paths.js +1 -0
- package/dist/src/commands/agent-readiness.js +2 -2
- package/dist/src/commands/daemon-service-spec.js +1 -1
- package/dist/src/commands/daemon.js +6 -6
- package/dist/src/commands/queue.js +1 -0
- package/dist/src/commands/room.js +3 -3
- package/dist/src/config/index.js +2 -2
- package/dist/src/fs/atomic-rename.js +1 -0
- package/dist/src/index.js +3 -3
- package/dist/src/native-fusion/claude-entry-parser.js +7 -0
- package/dist/src/native-fusion/local-repository.js +2 -2
- package/dist/src/native-fusion/native-source-deletions.js +2 -2
- package/dist/src/native-fusion/parsers.js +1 -3
- package/dist/src/native-fusion/state.js +2 -2
- package/dist/src/personal-sync/epoch.js +2 -2
- package/dist/src/personal-sync/identity.js +2 -2
- package/dist/src/relay/client.js +1 -1
- package/dist/src/room/activation-service.js +6 -6
- package/dist/src/room/attachment-cache.js +2 -2
- package/dist/src/room/host-session-observations.js +2 -2
- package/dist/src/room/managed-context.js +1 -1
- package/dist/src/room/managed-room-ipc.js +2 -2
- package/dist/src/room/mirror-sync-service.js +1 -1
- package/dist/src/room/public-attachment-cache.js +2 -2
- package/dist/src/room/room-error-guidance.js +1 -0
- package/dist/src/room/session-registry.js +2 -2
- package/dist/src/security/managed-agent-policy.js +1 -1
- package/dist/src/security/managed-agent-runtime.js +1 -1
- package/dist/src/session/attachment-transfer-store.js +2 -2
- package/dist/src/session/canonical-store.js +5 -5
- package/dist/src/session/deletion-sync-state.js +2 -2
- package/dist/src/session/handlers/agent-workspace-validation.js +1 -1
- package/dist/src/session/handlers/chat-adapter-config.js +1 -1
- package/dist/src/session/handlers/chat-events.js +2 -2
- package/dist/src/session/handlers/chat-recovery.js +1 -1
- package/dist/src/session/handlers/chat.js +1 -1
- package/dist/src/session/manager.js +1 -1
- package/dist/src/session/native-cleanup-outbox.js +2 -2
- package/dist/src/session/queue-diagnostics.js +1 -0
- package/dist/src/session/queue-dispatch-failure.js +1 -0
- package/dist/src/session/queue-helpers.js +5 -5
- package/dist/src/session/queue-retry.js +1 -1
- package/dist/src/session/queue-storage.js +2 -2
- package/dist/src/session/queue.js +1 -1
- package/dist/src/session/room-reply-notice.js +1 -0
- package/dist/src/session/run-recovery/journal.js +2 -2
- package/dist/src/session/run-stall.js +1 -0
- package/dist/src/session/store.js +2 -2
- package/dist/src/session/tool-detail-store.js +2 -2
- package/node_modules/@shennian/wire/dist/agent-capabilities.js +1 -1
- package/node_modules/@shennian/wire/dist/agent-workspace.js +1 -144
- package/node_modules/@shennian/wire/dist/envelope.js +1 -1
- package/node_modules/@shennian/wire/dist/events.js +1 -1
- package/node_modules/@shennian/wire/dist/external-message-format.js +3 -70
- package/node_modules/@shennian/wire/dist/frames.js +1 -1
- package/node_modules/@shennian/wire/dist/fs.js +2 -7
- package/node_modules/@shennian/wire/dist/index.js +1 -21
- package/node_modules/@shennian/wire/dist/machine.js +1 -1
- package/node_modules/@shennian/wire/dist/message-payload.js +8 -307
- package/node_modules/@shennian/wire/dist/methods.js +1 -3
- package/node_modules/@shennian/wire/dist/native-session.js +1 -1
- package/node_modules/@shennian/wire/dist/project-fs.js +1 -462
- package/node_modules/@shennian/wire/dist/project-path.js +1 -25
- package/node_modules/@shennian/wire/dist/project.js +1 -3
- package/node_modules/@shennian/wire/dist/relay-connectivity.js +1 -29
- package/node_modules/@shennian/wire/dist/room.js +1 -20
- package/node_modules/@shennian/wire/dist/schedule.js +1 -1
- package/node_modules/@shennian/wire/dist/session-sync.js +1 -123
- package/node_modules/@shennian/wire/dist/session.js +1 -60
- package/node_modules/@shennian/wire/dist/tool-detail.js +1 -9
- package/node_modules/@shennian/wire/dist/voice-chief.js +1 -3
- package/package.json +3 -8
- package/dist/bin/shennian.d.ts +0 -2
- package/dist/src/agent-env.d.ts +0 -44
- package/dist/src/agents/acp/adapter.d.ts +0 -82
- package/dist/src/agents/acp/auth-state.d.ts +0 -3
- package/dist/src/agents/acp/auth.d.ts +0 -7
- package/dist/src/agents/acp/capability-cache.d.ts +0 -14
- package/dist/src/agents/acp/catalog.d.ts +0 -11
- package/dist/src/agents/acp/client-services.d.ts +0 -37
- package/dist/src/agents/acp/discovery.d.ts +0 -10
- package/dist/src/agents/acp/events.d.ts +0 -4
- package/dist/src/agents/acp/manifests.d.ts +0 -63
- package/dist/src/agents/acp/metrics.d.ts +0 -24
- package/dist/src/agents/acp/package-commands.d.ts +0 -4
- package/dist/src/agents/acp/process-client.d.ts +0 -41
- package/dist/src/agents/acp/process-tree.d.ts +0 -2
- package/dist/src/agents/acp/types.d.ts +0 -31
- package/dist/src/agents/acp/watcher.d.ts +0 -22
- package/dist/src/agents/adapter.d.ts +0 -180
- package/dist/src/agents/auth-status.d.ts +0 -4
- package/dist/src/agents/claude-managed-permissions.d.ts +0 -33
- package/dist/src/agents/claude.d.ts +0 -69
- package/dist/src/agents/codex-managed-permissions.d.ts +0 -32
- package/dist/src/agents/codex-managed-room-tools.d.ts +0 -41
- package/dist/src/agents/codex-protocol.d.ts +0 -103
- package/dist/src/agents/codex-runtime.d.ts +0 -91
- package/dist/src/agents/codex-utils.d.ts +0 -29
- package/dist/src/agents/codex.d.ts +0 -59
- package/dist/src/agents/command-spec.d.ts +0 -55
- package/dist/src/agents/config-status.d.ts +0 -18
- package/dist/src/agents/cursor-managed-permissions.d.ts +0 -28
- package/dist/src/agents/cursor.d.ts +0 -44
- package/dist/src/agents/custom-managed-runtime.d.ts +0 -37
- package/dist/src/agents/custom-recovery-conformance.d.ts +0 -2
- package/dist/src/agents/custom.d.ts +0 -62
- package/dist/src/agents/detect.d.ts +0 -23
- package/dist/src/agents/event-terminal-gate.d.ts +0 -16
- package/dist/src/agents/external-channel-instructions.d.ts +0 -4
- package/dist/src/agents/gemini.d.ts +0 -32
- package/dist/src/agents/manager.d.ts +0 -57
- package/dist/src/agents/model-registry/cache.d.ts +0 -4
- package/dist/src/agents/model-registry/discovery.d.ts +0 -4
- package/dist/src/agents/model-registry/opencode-api.d.ts +0 -2
- package/dist/src/agents/model-registry/parsers.d.ts +0 -20
- package/dist/src/agents/model-registry/runner.d.ts +0 -6
- package/dist/src/agents/model-registry/service.d.ts +0 -10
- package/dist/src/agents/model-registry/types.d.ts +0 -39
- package/dist/src/agents/model-registry.d.ts +0 -17
- package/dist/src/agents/native-capabilities.d.ts +0 -10
- package/dist/src/agents/openclaw.d.ts +0 -29
- package/dist/src/agents/opencode-managed-permissions.d.ts +0 -25
- package/dist/src/agents/opencode.d.ts +0 -46
- package/dist/src/agents/pi-coding-agent-managed-permissions.d.ts +0 -7
- package/dist/src/agents/pi-coding-agent.d.ts +0 -63
- package/dist/src/agents/pi-managed-extension.d.ts +0 -12
- package/dist/src/agents/pi-managed-model-broker.d.ts +0 -27
- package/dist/src/agents/pi-managed-model-broker.js +0 -1
- package/dist/src/agents/pi-rpc-client.d.ts +0 -31
- package/dist/src/agents/pi-session-ownership.d.ts +0 -2
- package/dist/src/agents/platform-instructions.d.ts +0 -5
- package/dist/src/agents/runtime-compatibility.d.ts +0 -11
- package/dist/src/agents/workbuddy-managed-permissions.d.ts +0 -37
- package/dist/src/agents/workbuddy.d.ts +0 -63
- package/dist/src/commands/agent-readiness.d.ts +0 -17
- package/dist/src/commands/agent.d.ts +0 -2
- package/dist/src/commands/daemon-instance-lock.d.ts +0 -21
- package/dist/src/commands/daemon-process.d.ts +0 -6
- package/dist/src/commands/daemon-service-spec.d.ts +0 -26
- package/dist/src/commands/daemon-start-wait.d.ts +0 -9
- package/dist/src/commands/daemon-state.d.ts +0 -57
- package/dist/src/commands/daemon-windows.d.ts +0 -33
- package/dist/src/commands/daemon.d.ts +0 -67
- package/dist/src/commands/integration.d.ts +0 -3
- package/dist/src/commands/logout.d.ts +0 -3
- package/dist/src/commands/manager.d.ts +0 -2
- package/dist/src/commands/pair-authorization.d.ts +0 -3
- package/dist/src/commands/pair-browser.d.ts +0 -44
- package/dist/src/commands/pair-qr.d.ts +0 -4
- package/dist/src/commands/pair.d.ts +0 -19
- package/dist/src/commands/room.d.ts +0 -16
- package/dist/src/commands/runtime.d.ts +0 -2
- package/dist/src/commands/schedule.d.ts +0 -2
- package/dist/src/commands/tools.d.ts +0 -2
- package/dist/src/commands/upgrade.d.ts +0 -31
- package/dist/src/commands/worker.d.ts +0 -11
- package/dist/src/config/index.d.ts +0 -58
- package/dist/src/daemon-ipc/agent-readiness.d.ts +0 -15
- package/dist/src/daemon-ipc/client.d.ts +0 -8
- package/dist/src/daemon-ipc/control.d.ts +0 -16
- package/dist/src/daemon-ipc/json.d.ts +0 -3
- package/dist/src/daemon-ipc/paths.d.ts +0 -15
- package/dist/src/daemon-ipc/protocol.d.ts +0 -31
- package/dist/src/daemon-ipc/secret.d.ts +0 -3
- package/dist/src/daemon-ipc/server.d.ts +0 -20
- package/dist/src/daemon-log.d.ts +0 -9
- package/dist/src/env-path.d.ts +0 -15
- package/dist/src/fs/boundary.d.ts +0 -23
- package/dist/src/fs/handler.d.ts +0 -26
- package/dist/src/fs/security.d.ts +0 -2
- package/dist/src/fs/text-decoder.d.ts +0 -10
- package/dist/src/index.d.ts +0 -1
- package/dist/src/log-redaction.d.ts +0 -4
- package/dist/src/log-reporter.d.ts +0 -41
- package/dist/src/manager/prompt.d.ts +0 -2
- package/dist/src/manager/registry.d.ts +0 -184
- package/dist/src/manager/retired-external-channel-compat.d.ts +0 -78
- package/dist/src/manager/runtime.d.ts +0 -90
- package/dist/src/manager/worker-ipc.d.ts +0 -28
- package/dist/src/manager/worker-markdown.d.ts +0 -10
- package/dist/src/native-fusion/codex-files.d.ts +0 -10
- package/dist/src/native-fusion/codex-message-parser.d.ts +0 -9
- package/dist/src/native-fusion/codex-parser.d.ts +0 -8
- package/dist/src/native-fusion/codex-user-input.d.ts +0 -11
- package/dist/src/native-fusion/config.d.ts +0 -1
- package/dist/src/native-fusion/file-identity.d.ts +0 -9
- package/dist/src/native-fusion/file-watcher.d.ts +0 -26
- package/dist/src/native-fusion/local-repository.d.ts +0 -90
- package/dist/src/native-fusion/native-source-deletions.d.ts +0 -47
- package/dist/src/native-fusion/opencode-parser.d.ts +0 -29
- package/dist/src/native-fusion/parser-common.d.ts +0 -35
- package/dist/src/native-fusion/parsers.d.ts +0 -13
- package/dist/src/native-fusion/service.d.ts +0 -64
- package/dist/src/native-fusion/session-header.d.ts +0 -13
- package/dist/src/native-fusion/session-native-sources.d.ts +0 -24
- package/dist/src/native-fusion/source-visibility-audit.d.ts +0 -16
- package/dist/src/native-fusion/source-visibility.d.ts +0 -25
- package/dist/src/native-fusion/state.d.ts +0 -4
- package/dist/src/native-fusion/types.d.ts +0 -82
- package/dist/src/personal-sync/epoch.d.ts +0 -17
- package/dist/src/personal-sync/identity.d.ts +0 -1
- package/dist/src/personal-sync/machine-authority.d.ts +0 -12
- package/dist/src/personal-sync/metrics.d.ts +0 -25
- package/dist/src/personal-sync/paths.d.ts +0 -5
- package/dist/src/region.d.ts +0 -15
- package/dist/src/relay/client.d.ts +0 -81
- package/dist/src/room/activation-audit.d.ts +0 -15
- package/dist/src/room/activation-policy.d.ts +0 -8
- package/dist/src/room/activation-service.d.ts +0 -77
- package/dist/src/room/attachment-cache.d.ts +0 -44
- package/dist/src/room/attachment-upload.d.ts +0 -20
- package/dist/src/room/device-authorization-client.d.ts +0 -91
- package/dist/src/room/host-session-observations.d.ts +0 -54
- package/dist/src/room/invite-bootstrap.d.ts +0 -49
- package/dist/src/room/invite-qr.d.ts +0 -6
- package/dist/src/room/live-delivery.d.ts +0 -5
- package/dist/src/room/managed-context.d.ts +0 -49
- package/dist/src/room/managed-prompt-composer.d.ts +0 -47
- package/dist/src/room/managed-room-binding.d.ts +0 -69
- package/dist/src/room/managed-room-ipc.d.ts +0 -65
- package/dist/src/room/mirror-sync-service.d.ts +0 -49
- package/dist/src/room/public-attachment-cache.d.ts +0 -34
- package/dist/src/room/public-room-client.d.ts +0 -37
- package/dist/src/room/registration-authority.d.ts +0 -4
- package/dist/src/room/room-action-client-types.d.ts +0 -137
- package/dist/src/room/room-action-client.d.ts +0 -116
- package/dist/src/room/room-binding-client.d.ts +0 -62
- package/dist/src/room/session-registry.d.ts +0 -158
- package/dist/src/runtime-distribution.d.ts +0 -7
- package/dist/src/schedules/personal-context.d.ts +0 -2
- package/dist/src/schedules/server-client.d.ts +0 -19
- package/dist/src/security/managed-agent-credential-paths.d.ts +0 -6
- package/dist/src/security/managed-agent-executable.d.ts +0 -19
- package/dist/src/security/managed-agent-policy.d.ts +0 -66
- package/dist/src/security/managed-agent-runtime.d.ts +0 -44
- package/dist/src/session/archive-zip.d.ts +0 -10
- package/dist/src/session/attachment-reference.d.ts +0 -2
- package/dist/src/session/attachment-transfer-store.d.ts +0 -45
- package/dist/src/session/canonical-store.d.ts +0 -104
- package/dist/src/session/deletion-sync-state.d.ts +0 -20
- package/dist/src/session/deletion-sync-validation.d.ts +0 -2
- package/dist/src/session/deletion-synchronizer.d.ts +0 -9
- package/dist/src/session/handlers/agent-capabilities.d.ts +0 -3
- package/dist/src/session/handlers/agent-config.d.ts +0 -7
- package/dist/src/session/handlers/agent-control.d.ts +0 -4
- package/dist/src/session/handlers/agent-workspace-validation.d.ts +0 -28
- package/dist/src/session/handlers/agents.d.ts +0 -11
- package/dist/src/session/handlers/chat-adapter-config.d.ts +0 -11
- package/dist/src/session/handlers/chat-context.d.ts +0 -31
- package/dist/src/session/handlers/chat-events.d.ts +0 -5
- package/dist/src/session/handlers/chat-recovery.d.ts +0 -4
- package/dist/src/session/handlers/chat-session-lifecycle.d.ts +0 -9
- package/dist/src/session/handlers/chat.d.ts +0 -6
- package/dist/src/session/handlers/control.d.ts +0 -5
- package/dist/src/session/handlers/fs.d.ts +0 -14
- package/dist/src/session/handlers/message-status.d.ts +0 -3
- package/dist/src/session/handlers/pi-validation-session.d.ts +0 -7
- package/dist/src/session/handlers/pi-validation-session.js +0 -1
- package/dist/src/session/handlers/project-fs.d.ts +0 -11
- package/dist/src/session/handlers/remote-access.d.ts +0 -4
- package/dist/src/session/handlers/room-managed.d.ts +0 -6
- package/dist/src/session/handlers/session-refresh.d.ts +0 -3
- package/dist/src/session/handlers/title.d.ts +0 -3
- package/dist/src/session/handlers/tool-detail.d.ts +0 -3
- package/dist/src/session/handlers/voice-window.d.ts +0 -3
- package/dist/src/session/history-subscriptions.d.ts +0 -29
- package/dist/src/session/index-publisher.d.ts +0 -3
- package/dist/src/session/manager-event-authority.d.ts +0 -3
- package/dist/src/session/manager.d.ts +0 -95
- package/dist/src/session/native-cleanup-outbox.d.ts +0 -64
- package/dist/src/session/native-session-lifecycle.d.ts +0 -56
- package/dist/src/session/project-fs-store.d.ts +0 -43
- package/dist/src/session/projection.d.ts +0 -3
- package/dist/src/session/queue-control.d.ts +0 -27
- package/dist/src/session/queue-helpers.d.ts +0 -20
- package/dist/src/session/queue-message.d.ts +0 -35
- package/dist/src/session/queue-retry.d.ts +0 -11
- package/dist/src/session/queue-storage.d.ts +0 -8
- package/dist/src/session/queue-types.d.ts +0 -31
- package/dist/src/session/queue.d.ts +0 -73
- package/dist/src/session/queued-chat-dispatch.d.ts +0 -12
- package/dist/src/session/run-recovery/barrier.d.ts +0 -12
- package/dist/src/session/run-recovery/coordinator.d.ts +0 -32
- package/dist/src/session/run-recovery/journal.d.ts +0 -30
- package/dist/src/session/run-recovery/schema.d.ts +0 -48
- package/dist/src/session/store.d.ts +0 -128
- package/dist/src/session/tool-detail-store.d.ts +0 -17
- package/dist/src/session/turn-trigger.d.ts +0 -43
- package/dist/src/session/types.d.ts +0 -93
- package/dist/src/tools/markdown-to-pdf.d.ts +0 -42
- package/dist/src/upgrade/channel.d.ts +0 -5
- package/dist/src/upgrade/distribution.d.ts +0 -21
- package/dist/src/upgrade/engine.d.ts +0 -104
- package/dist/src/upgrade/scheduler.d.ts +0 -60
- package/dist/src/upgrade/updater-bootstrap.d.ts +0 -12
- package/dist/src/upgrade/updater-launcher.d.ts +0 -37
- package/dist/src/upgrade/updater-protocol.d.ts +0 -40
- package/dist/src/upgrade/updater-service-entry.d.ts +0 -7
- package/dist/src/upgrade/updater-worker.d.ts +0 -57
- package/dist/src/windows-shell.d.ts +0 -6
- package/node_modules/@shennian/wire/dist/agent-capabilities.d.ts +0 -16
- package/node_modules/@shennian/wire/dist/agent-workspace.d.ts +0 -133
- package/node_modules/@shennian/wire/dist/envelope.d.ts +0 -7
- package/node_modules/@shennian/wire/dist/events.d.ts +0 -125
- package/node_modules/@shennian/wire/dist/external-message-format.d.ts +0 -37
- package/node_modules/@shennian/wire/dist/frames.d.ts +0 -33
- package/node_modules/@shennian/wire/dist/fs.d.ts +0 -107
- package/node_modules/@shennian/wire/dist/index.d.ts +0 -21
- package/node_modules/@shennian/wire/dist/machine.d.ts +0 -160
- package/node_modules/@shennian/wire/dist/message-payload.d.ts +0 -71
- package/node_modules/@shennian/wire/dist/methods.d.ts +0 -5
- package/node_modules/@shennian/wire/dist/native-session.d.ts +0 -20
- package/node_modules/@shennian/wire/dist/project-fs.d.ts +0 -146
- package/node_modules/@shennian/wire/dist/project-path.d.ts +0 -4
- package/node_modules/@shennian/wire/dist/project.d.ts +0 -16
- package/node_modules/@shennian/wire/dist/relay-connectivity.d.ts +0 -30
- package/node_modules/@shennian/wire/dist/room.d.ts +0 -190
- package/node_modules/@shennian/wire/dist/schedule.d.ts +0 -37
- package/node_modules/@shennian/wire/dist/session-sync.d.ts +0 -406
- package/node_modules/@shennian/wire/dist/session.d.ts +0 -465
- package/node_modules/@shennian/wire/dist/tool-detail.d.ts +0 -38
- package/node_modules/@shennian/wire/dist/voice-chief.d.ts +0 -116
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UPDATER_PROTOCOL_VERSION } from './updater-protocol.js';
|
|
2
|
-
export type UpdaterReadiness = {
|
|
3
|
-
protocolVersion: typeof UPDATER_PROTOCOL_VERSION;
|
|
4
|
-
workerPath: string;
|
|
5
|
-
installedAt: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function ensureUpdaterInstalled(options?: {
|
|
8
|
-
root?: string;
|
|
9
|
-
assetPath?: string;
|
|
10
|
-
now?: Date;
|
|
11
|
-
}): UpdaterReadiness;
|
|
12
|
-
export declare function readUpdaterReadiness(root?: string): UpdaterReadiness | null;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { spawn, spawnSync, type ChildProcess } from 'node:child_process';
|
|
2
|
-
import { ensureUpdaterInstalled } from './updater-bootstrap.js';
|
|
3
|
-
import { type UpdaterJob } from './updater-protocol.js';
|
|
4
|
-
export declare function createUpdaterJob(input: {
|
|
5
|
-
fromVersion: string;
|
|
6
|
-
targetVersion: string;
|
|
7
|
-
oldDaemonPid: number | null;
|
|
8
|
-
npmPrefix?: string;
|
|
9
|
-
npmExecutable?: string;
|
|
10
|
-
nodeExecutable?: string;
|
|
11
|
-
root?: string;
|
|
12
|
-
now?: Date;
|
|
13
|
-
jobId?: string;
|
|
14
|
-
operation?: 'upgrade' | 'rollback';
|
|
15
|
-
isolatedDaemonStart?: boolean;
|
|
16
|
-
rollbackJobId?: string;
|
|
17
|
-
requireHandoffAck?: boolean;
|
|
18
|
-
}): UpdaterJob;
|
|
19
|
-
export declare function writeUpdaterJob(job: UpdaterJob, root?: string): string;
|
|
20
|
-
export declare function needsSystemdUpdater(platform: string, cgroup: string): boolean;
|
|
21
|
-
export declare function launchUpdater(input: Parameters<typeof createUpdaterJob>[0], deps?: {
|
|
22
|
-
root?: string;
|
|
23
|
-
spawn?: typeof spawn;
|
|
24
|
-
readiness?: ReturnType<typeof ensureUpdaterInstalled>;
|
|
25
|
-
now?: () => number;
|
|
26
|
-
isAlive?: (pid: number) => boolean;
|
|
27
|
-
serviceCgroup?: string;
|
|
28
|
-
platform?: NodeJS.Platform;
|
|
29
|
-
systemdRun?: typeof spawnSync;
|
|
30
|
-
}): {
|
|
31
|
-
job: UpdaterJob;
|
|
32
|
-
process: ChildProcess | null;
|
|
33
|
-
};
|
|
34
|
-
/** Do not freeze/exit just because spawn succeeded: require worker readiness. */
|
|
35
|
-
export declare function waitForUpdaterReady(job: UpdaterJob, timeoutMs?: number): Promise<void>;
|
|
36
|
-
export declare function confirmUpdaterHandoff(job: UpdaterJob): void;
|
|
37
|
-
export declare function markUpdaterHealthy(jobId: string, effectiveVersion: string, root?: string): boolean;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare const UPDATER_PROTOCOL_VERSION: 1;
|
|
2
|
-
export type UpdaterJob = {
|
|
3
|
-
protocolVersion: typeof UPDATER_PROTOCOL_VERSION;
|
|
4
|
-
jobId: string;
|
|
5
|
-
fromVersion: string;
|
|
6
|
-
targetVersion: string;
|
|
7
|
-
npmPrefix: string;
|
|
8
|
-
npmExecutable: string;
|
|
9
|
-
nodeExecutable: string;
|
|
10
|
-
packageName: 'shennian';
|
|
11
|
-
operation: 'upgrade' | 'rollback';
|
|
12
|
-
oldDaemonPid: number | null;
|
|
13
|
-
platform: NodeJS.Platform;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
daemonExitTimeoutMs: number;
|
|
16
|
-
commandTimeoutMs: number;
|
|
17
|
-
resultPath: string;
|
|
18
|
-
attemptPath: string;
|
|
19
|
-
/** Release-smoke only: bypass installed platform service and use exact-bin fallback. */
|
|
20
|
-
isolatedDaemonStart?: boolean;
|
|
21
|
-
/** Original local installation transaction used by crash-loop recovery. */
|
|
22
|
-
rollbackJobId?: string;
|
|
23
|
-
requireHandoffAck?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export type UpdaterResultState = 'waiting_for_daemon' | 'installing' | 'verifying' | 'starting' | 'healthy' | 'rolled_back' | 'failed';
|
|
26
|
-
export type UpdaterErrorCode = 'invalid_job' | 'job_expired' | 'upgrade_locked' | 'daemon_exit_timeout' | 'npm_install_failed' | 'verification_failed' | 'rollback_failed' | 'daemon_start_failed' | 'internal_error';
|
|
27
|
-
export type UpdaterResult = {
|
|
28
|
-
protocolVersion: typeof UPDATER_PROTOCOL_VERSION;
|
|
29
|
-
jobId: string;
|
|
30
|
-
state: UpdaterResultState;
|
|
31
|
-
fromVersion: string;
|
|
32
|
-
targetVersion: string;
|
|
33
|
-
operation?: 'upgrade' | 'rollback';
|
|
34
|
-
effectiveVersion?: string;
|
|
35
|
-
errorCode?: UpdaterErrorCode;
|
|
36
|
-
errorSummary?: string;
|
|
37
|
-
updatedAt: string;
|
|
38
|
-
};
|
|
39
|
-
export declare function parseUpdaterJob(value: unknown): UpdaterJob;
|
|
40
|
-
export declare function sanitizeUpdaterError(error: unknown): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { execFileSync } from 'node:child_process';
|
|
2
|
-
import type { UpdaterJob } from './updater-protocol.js';
|
|
3
|
-
/** Update only this installation's service entry, without restarting the daemon. */
|
|
4
|
-
export declare function prepareRecoveryServiceEntry(job: UpdaterJob, workerPath: string, deps?: {
|
|
5
|
-
home?: string;
|
|
6
|
-
run?: typeof execFileSync;
|
|
7
|
-
}): void;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { execFile as execFileCallback } from 'node:child_process';
|
|
2
|
-
declare const execFile: typeof execFileCallback.__promisify__;
|
|
3
|
-
type Job = {
|
|
4
|
-
protocolVersion: 1;
|
|
5
|
-
jobId: string;
|
|
6
|
-
fromVersion: string;
|
|
7
|
-
targetVersion: string;
|
|
8
|
-
npmPrefix: string;
|
|
9
|
-
npmExecutable: string;
|
|
10
|
-
nodeExecutable: string;
|
|
11
|
-
packageName: 'shennian';
|
|
12
|
-
operation: 'upgrade' | 'rollback';
|
|
13
|
-
oldDaemonPid: number | null;
|
|
14
|
-
platform: NodeJS.Platform;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
daemonExitTimeoutMs: number;
|
|
17
|
-
commandTimeoutMs: number;
|
|
18
|
-
resultPath: string;
|
|
19
|
-
attemptPath: string;
|
|
20
|
-
isolatedDaemonStart?: boolean;
|
|
21
|
-
rollbackJobId?: string;
|
|
22
|
-
requireHandoffAck?: boolean;
|
|
23
|
-
};
|
|
24
|
-
type WorkerDeps = {
|
|
25
|
-
now?: () => number;
|
|
26
|
-
isAlive?: (pid: number) => boolean;
|
|
27
|
-
kill?: (pid: number, signal: NodeJS.Signals) => void;
|
|
28
|
-
sleep?: (ms: number) => Promise<void>;
|
|
29
|
-
execFile?: typeof execFile;
|
|
30
|
-
healthTimeoutMs?: number;
|
|
31
|
-
serviceRecovery?: boolean;
|
|
32
|
-
fetch?: typeof globalThis.fetch;
|
|
33
|
-
fetchOwnedArtifact?: (version: string) => Promise<OwnedArtifact | null>;
|
|
34
|
-
sourceOrder?: 'npm-first' | 'oss-first';
|
|
35
|
-
};
|
|
36
|
-
export declare function updaterPaths(job: Job): {
|
|
37
|
-
active: string;
|
|
38
|
-
transaction: string;
|
|
39
|
-
prefix: string;
|
|
40
|
-
candidate: string;
|
|
41
|
-
previous: string;
|
|
42
|
-
rejected: string;
|
|
43
|
-
marker: string;
|
|
44
|
-
};
|
|
45
|
-
export declare function verifyLocalPackage(directory: string, version: string): void;
|
|
46
|
-
export declare function assertUpdaterAvailable(root: string): void;
|
|
47
|
-
export declare function prepareUpdaterCandidate(job: Job, deps?: WorkerDeps): Promise<void>;
|
|
48
|
-
/** Validate an already materialized candidate too (offline repair/artifact transport). */
|
|
49
|
-
export declare function finalizeUpdaterCandidate(job: Job, deps?: WorkerDeps): Promise<void>;
|
|
50
|
-
type OwnedArtifact = {
|
|
51
|
-
url: string;
|
|
52
|
-
size: number;
|
|
53
|
-
integrity: string;
|
|
54
|
-
};
|
|
55
|
-
export declare function runUpdaterJob(jobPath: string, deps?: WorkerDeps): Promise<void>;
|
|
56
|
-
export declare function recoverServiceEntry(root: string): Promise<void>;
|
|
57
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function resolveWindowsSystemRoot(env?: NodeJS.ProcessEnv): string;
|
|
2
|
-
export declare function resolveWindowsPowerShellPath(input?: {
|
|
3
|
-
env?: NodeJS.ProcessEnv;
|
|
4
|
-
exists?: (filePath: string) => boolean;
|
|
5
|
-
}): string;
|
|
6
|
-
export declare function buildWindowsSystemEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type AgentCapabilityProvider = 'codex' | 'claude' | 'workbuddy';
|
|
2
|
-
export type AgentCapabilityKind = 'skill' | 'plugin_skill';
|
|
3
|
-
export type AgentCapabilitySource = 'personal' | 'project' | 'plugin' | 'system';
|
|
4
|
-
export type AgentNativeCapability = {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
kind: AgentCapabilityKind;
|
|
9
|
-
source: AgentCapabilitySource;
|
|
10
|
-
invocation: string;
|
|
11
|
-
};
|
|
12
|
-
export type AgentCapabilitiesListPayload = {
|
|
13
|
-
supported: boolean;
|
|
14
|
-
agentType: string;
|
|
15
|
-
capabilities: AgentNativeCapability[];
|
|
16
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import type { AgentType, ManagerConfig, SessionMode } from './session.ts';
|
|
2
|
-
import type { AgentRepairAction, AgentRuntimeAvailability, RoomActivationMode } from './room.ts';
|
|
3
|
-
export declare const MANAGED_AGENT_PERMISSION_POLICY_VERSION = 1;
|
|
4
|
-
export type ManagedAgentExecutionMode = 'native-full' | 'restricted';
|
|
5
|
-
export type ManagedAgentFileAccess = 'workspace-read' | 'workspace-write' | 'host-full';
|
|
6
|
-
export type ManagedAgentExternalCapabilities = {
|
|
7
|
-
commandNetwork: boolean;
|
|
8
|
-
webSearch: boolean;
|
|
9
|
-
browser: boolean;
|
|
10
|
-
computerUse: boolean;
|
|
11
|
-
mcp: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type ManagedAgentPermissionPolicy = {
|
|
14
|
-
/** Monotonic AgentIdentity policy revision, owned by the server. */
|
|
15
|
-
version: number;
|
|
16
|
-
/** Optional on the wire only for clients released before execution modes. */
|
|
17
|
-
executionMode?: ManagedAgentExecutionMode;
|
|
18
|
-
fileAccess: ManagedAgentFileAccess;
|
|
19
|
-
externalCapabilities: ManagedAgentExternalCapabilities;
|
|
20
|
-
};
|
|
21
|
-
export type ManagedAgentEnforcementLevel = 'hard' | 'partial' | 'unverified';
|
|
22
|
-
export type ManagedAgentRuntimeCapabilityMatrix = {
|
|
23
|
-
fileAccess: Record<ManagedAgentFileAccess, boolean>;
|
|
24
|
-
externalCapabilities: {
|
|
25
|
-
[Capability in keyof ManagedAgentExternalCapabilities]: {
|
|
26
|
-
allow: boolean;
|
|
27
|
-
deny: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export type ManagedAgentRuntimeProtection = {
|
|
32
|
-
level: ManagedAgentEnforcementLevel;
|
|
33
|
-
runtimeVersion: string;
|
|
34
|
-
platform: string;
|
|
35
|
-
/** Stable digest of the exact executable selected by the daemon. Absent on older daemons. */
|
|
36
|
-
executableFingerprint?: string;
|
|
37
|
-
unsupportedCapabilities: string[];
|
|
38
|
-
/** Directional native capability evidence; absent means the runtime is not trusted. */
|
|
39
|
-
capabilityMatrix?: ManagedAgentRuntimeCapabilityMatrix;
|
|
40
|
-
};
|
|
41
|
-
export type ManagedAgentEnforcement = ManagedAgentRuntimeProtection & {
|
|
42
|
-
effectivePolicy: ManagedAgentPermissionPolicy;
|
|
43
|
-
};
|
|
44
|
-
/** One-time request proving that the user accepted the currently displayed runtime risk. */
|
|
45
|
-
export type ManagedAgentPermissionConfirmationRequest = {
|
|
46
|
-
runtimeAdapter: AgentType;
|
|
47
|
-
runtimeVersion: string;
|
|
48
|
-
platform: string;
|
|
49
|
-
executableFingerprint: string;
|
|
50
|
-
/** Missing values belong to confirmations created before execution modes. */
|
|
51
|
-
executionMode?: ManagedAgentExecutionMode;
|
|
52
|
-
hostFullAccess: boolean;
|
|
53
|
-
limitedProtection: boolean;
|
|
54
|
-
};
|
|
55
|
-
/** Server-owned confirmation bound to one policy revision and one exact local runtime. */
|
|
56
|
-
export type ManagedAgentPermissionConfirmation = ManagedAgentPermissionConfirmationRequest & {
|
|
57
|
-
policyVersion: number;
|
|
58
|
-
confirmedAt: string;
|
|
59
|
-
};
|
|
60
|
-
export declare const DEFAULT_MANAGED_AGENT_PERMISSION_POLICY: ManagedAgentPermissionPolicy;
|
|
61
|
-
/** Explicit default sent by current creation surfaces; omission remains restricted. */
|
|
62
|
-
export declare const DEFAULT_NATIVE_FULL_MANAGED_AGENT_PERMISSION_POLICY: ManagedAgentPermissionPolicy;
|
|
63
|
-
/** Named alias used where the old-client fallback must be obvious at the call site. */
|
|
64
|
-
export declare const DEFAULT_RESTRICTED_MANAGED_AGENT_PERMISSION_POLICY: ManagedAgentPermissionPolicy;
|
|
65
|
-
/**
|
|
66
|
-
* Compatibility projection for payloads created before managed permissions existed.
|
|
67
|
-
* Missing policy data must never be presented as if a restrictive sandbox were active.
|
|
68
|
-
*/
|
|
69
|
-
export declare const LEGACY_MANAGED_AGENT_PERMISSION_POLICY: ManagedAgentPermissionPolicy;
|
|
70
|
-
/**
|
|
71
|
-
* Project the policy the runtime can actually guarantee. Missing directional
|
|
72
|
-
* evidence is treated as possible host-wide file and external access.
|
|
73
|
-
*/
|
|
74
|
-
export declare function resolveManagedAgentEffectivePermissionPolicy(requested: ManagedAgentPermissionPolicy, protection?: ManagedAgentRuntimeProtection | null): ManagedAgentPermissionPolicy;
|
|
75
|
-
/** Strictly parse an explicit policy. Invalid or incomplete values are not silently repaired. */
|
|
76
|
-
export declare function parseManagedAgentPermissionPolicy(value: unknown): ManagedAgentPermissionPolicy | null;
|
|
77
|
-
export declare function managedAgentExecutionMode(policy: ManagedAgentPermissionPolicy): ManagedAgentExecutionMode;
|
|
78
|
-
export declare function resolveManagedAgentPermissionPolicy(value: unknown, fallback?: 'default' | 'legacy'): ManagedAgentPermissionPolicy;
|
|
79
|
-
export type AgentWorkspaceRoomLink = {
|
|
80
|
-
bindingId: string;
|
|
81
|
-
status: string;
|
|
82
|
-
roomId: string;
|
|
83
|
-
roomName: string;
|
|
84
|
-
activationMode: RoomActivationMode;
|
|
85
|
-
/** Optional for compatibility with servers released before machine recovery. */
|
|
86
|
-
availability?: AgentRuntimeAvailability;
|
|
87
|
-
repairAction?: AgentRepairAction;
|
|
88
|
-
};
|
|
89
|
-
export type AgentWorkspaceSession = {
|
|
90
|
-
id: string;
|
|
91
|
-
title: string;
|
|
92
|
-
status: string;
|
|
93
|
-
agentType: AgentType;
|
|
94
|
-
modelId: string | null;
|
|
95
|
-
machineId: string;
|
|
96
|
-
machineName: string | null;
|
|
97
|
-
workDir: string;
|
|
98
|
-
lastActivityAt: string;
|
|
99
|
-
room: AgentWorkspaceRoomLink | null;
|
|
100
|
-
};
|
|
101
|
-
export type AgentWorkspace = {
|
|
102
|
-
id: string;
|
|
103
|
-
/** Monotonic server-owned revision of the complete managed Agent configuration. */
|
|
104
|
-
configurationVersion?: number;
|
|
105
|
-
displayName: string;
|
|
106
|
-
description: string;
|
|
107
|
-
systemPrompt: string;
|
|
108
|
-
avatar: {
|
|
109
|
-
version: string;
|
|
110
|
-
smallUrl: string;
|
|
111
|
-
mediumUrl: string;
|
|
112
|
-
updatedAt: string;
|
|
113
|
-
} | null;
|
|
114
|
-
status: string;
|
|
115
|
-
/** Optional additive field; old cached projections safely treat absence as available. */
|
|
116
|
-
availability?: AgentRuntimeAvailability;
|
|
117
|
-
repairAction?: AgentRepairAction;
|
|
118
|
-
pinnedAt?: string | null;
|
|
119
|
-
machineId: string | null;
|
|
120
|
-
machineName: string | null;
|
|
121
|
-
runtimeAdapter: AgentType | null;
|
|
122
|
-
workDir: string;
|
|
123
|
-
modelId: string | null;
|
|
124
|
-
sessionMode: SessionMode;
|
|
125
|
-
managerConfig: ManagerConfig | null;
|
|
126
|
-
/** Optional only for wire/cache compatibility. New servers always return an explicit policy. */
|
|
127
|
-
permissionPolicy?: ManagedAgentPermissionPolicy;
|
|
128
|
-
/** Null means this policy/runtime has no persisted high-risk or limited-protection approval. */
|
|
129
|
-
permissionConfirmation?: ManagedAgentPermissionConfirmation | null;
|
|
130
|
-
createdAt: string;
|
|
131
|
-
updatedAt: string;
|
|
132
|
-
sessions: AgentWorkspaceSession[];
|
|
133
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { Envelope } from './envelope.ts';
|
|
2
|
-
import type { SessionRunPhase } from './session.ts';
|
|
3
|
-
import type { ToolDetailRef } from './tool-detail.ts';
|
|
4
|
-
export type AgentEventPayload = {
|
|
5
|
-
state: 'init';
|
|
6
|
-
sessionId?: string;
|
|
7
|
-
agentSessionId?: string;
|
|
8
|
-
runId: string;
|
|
9
|
-
seq: number;
|
|
10
|
-
} | {
|
|
11
|
-
state: 'start';
|
|
12
|
-
sessionId?: string;
|
|
13
|
-
agentSessionId?: string;
|
|
14
|
-
runId: string;
|
|
15
|
-
seq: number;
|
|
16
|
-
} | {
|
|
17
|
-
state: 'heartbeat';
|
|
18
|
-
sessionId?: string;
|
|
19
|
-
runId: string;
|
|
20
|
-
seq: number;
|
|
21
|
-
runPhase: SessionRunPhase;
|
|
22
|
-
canStop?: boolean;
|
|
23
|
-
} | {
|
|
24
|
-
state: 'delta';
|
|
25
|
-
sessionId?: string;
|
|
26
|
-
runId: string;
|
|
27
|
-
seq: number;
|
|
28
|
-
text?: string;
|
|
29
|
-
thinking?: boolean;
|
|
30
|
-
} | {
|
|
31
|
-
state: 'final';
|
|
32
|
-
sessionId?: string;
|
|
33
|
-
agentSessionId?: string;
|
|
34
|
-
runId: string;
|
|
35
|
-
seq: number;
|
|
36
|
-
messageSummary?: string;
|
|
37
|
-
usage?: {
|
|
38
|
-
inputTokens: number;
|
|
39
|
-
outputTokens: number;
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
state: 'aborted';
|
|
43
|
-
sessionId?: string;
|
|
44
|
-
runId: string;
|
|
45
|
-
seq: number;
|
|
46
|
-
} | {
|
|
47
|
-
state: 'error';
|
|
48
|
-
sessionId?: string;
|
|
49
|
-
runId: string;
|
|
50
|
-
seq: number;
|
|
51
|
-
message: string;
|
|
52
|
-
errorCode?: 'acp_auth_required';
|
|
53
|
-
} | {
|
|
54
|
-
state: 'interrupted_by_upgrade';
|
|
55
|
-
sessionId?: string;
|
|
56
|
-
runId: string;
|
|
57
|
-
seq: number;
|
|
58
|
-
reason: string;
|
|
59
|
-
} | {
|
|
60
|
-
state: 'recovery_failed';
|
|
61
|
-
sessionId?: string;
|
|
62
|
-
runId: string;
|
|
63
|
-
seq: number;
|
|
64
|
-
reason: string;
|
|
65
|
-
message?: string;
|
|
66
|
-
} | {
|
|
67
|
-
state: 'approval-pending';
|
|
68
|
-
sessionId?: string;
|
|
69
|
-
runId: string;
|
|
70
|
-
seq: number;
|
|
71
|
-
approval?: {
|
|
72
|
-
title?: string;
|
|
73
|
-
content?: string;
|
|
74
|
-
source?: string;
|
|
75
|
-
actionHint?: string;
|
|
76
|
-
};
|
|
77
|
-
permission?: AcpPermissionPrompt;
|
|
78
|
-
} | {
|
|
79
|
-
state: 'tool-call';
|
|
80
|
-
sessionId?: string;
|
|
81
|
-
runId: string;
|
|
82
|
-
seq: number;
|
|
83
|
-
name: string;
|
|
84
|
-
toolCallId?: string;
|
|
85
|
-
toolStatus?: 'running' | 'completed' | 'failed';
|
|
86
|
-
args?: Record<string, unknown>;
|
|
87
|
-
detailRef?: ToolDetailRef;
|
|
88
|
-
durationMs?: number;
|
|
89
|
-
} | {
|
|
90
|
-
state: 'tool-result';
|
|
91
|
-
sessionId?: string;
|
|
92
|
-
runId: string;
|
|
93
|
-
seq: number;
|
|
94
|
-
name: string;
|
|
95
|
-
toolCallId?: string;
|
|
96
|
-
toolStatus?: 'running' | 'completed' | 'failed';
|
|
97
|
-
result?: string;
|
|
98
|
-
detailRef?: ToolDetailRef;
|
|
99
|
-
durationMs?: number;
|
|
100
|
-
} | {
|
|
101
|
-
state: 'notify';
|
|
102
|
-
source: string;
|
|
103
|
-
text: string;
|
|
104
|
-
} | {
|
|
105
|
-
state: 'history-chunk';
|
|
106
|
-
sessionId: string;
|
|
107
|
-
messages: Envelope[];
|
|
108
|
-
hasMore: boolean;
|
|
109
|
-
} | {
|
|
110
|
-
state: 'history-done';
|
|
111
|
-
sessionId: string;
|
|
112
|
-
total: number;
|
|
113
|
-
};
|
|
114
|
-
export type AcpPermissionPrompt = {
|
|
115
|
-
id: string;
|
|
116
|
-
sessionId?: string;
|
|
117
|
-
agentSessionId?: string;
|
|
118
|
-
runId?: string;
|
|
119
|
-
toolCallId: string;
|
|
120
|
-
options: Array<{
|
|
121
|
-
id: string;
|
|
122
|
-
name: string;
|
|
123
|
-
kind: 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
|
|
124
|
-
}>;
|
|
125
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export type ExternalMessageFormatAttachment = {
|
|
2
|
-
type?: string;
|
|
3
|
-
name?: string;
|
|
4
|
-
path?: string;
|
|
5
|
-
url?: string;
|
|
6
|
-
localPath?: string;
|
|
7
|
-
thumbnailPath?: string;
|
|
8
|
-
mimeType?: string;
|
|
9
|
-
availability?: string;
|
|
10
|
-
providerError?: string;
|
|
11
|
-
};
|
|
12
|
-
export type ExternalMessageFormatMessage = {
|
|
13
|
-
senderName?: string | null;
|
|
14
|
-
senderId?: string | null;
|
|
15
|
-
text?: string | null;
|
|
16
|
-
attachments?: ExternalMessageFormatAttachment[];
|
|
17
|
-
isTrigger?: boolean;
|
|
18
|
-
timestampLabel?: string | null;
|
|
19
|
-
};
|
|
20
|
-
export type FormattedExternalConversationMessage = {
|
|
21
|
-
text: string;
|
|
22
|
-
attachmentLines: string[];
|
|
23
|
-
};
|
|
24
|
-
export declare function formatExternalAttachmentReference(attachment: ExternalMessageFormatAttachment, index?: number): string;
|
|
25
|
-
export declare function formatExternalMessageLine(input: {
|
|
26
|
-
senderName?: string | null;
|
|
27
|
-
senderId?: string | null;
|
|
28
|
-
text?: string | null;
|
|
29
|
-
isTrigger?: boolean;
|
|
30
|
-
timestampLabel?: string | null;
|
|
31
|
-
}): string;
|
|
32
|
-
export declare function formatExternalConversationMessage(message: ExternalMessageFormatMessage): FormattedExternalConversationMessage;
|
|
33
|
-
export declare function formatExternalConversationText(input: {
|
|
34
|
-
conversationName?: string | null;
|
|
35
|
-
messages: ExternalMessageFormatMessage[];
|
|
36
|
-
includeContextLabel?: boolean;
|
|
37
|
-
}): string;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ReqMethod } from './methods.ts';
|
|
2
|
-
import type { SessionSyncRejection } from './session-sync.ts';
|
|
3
|
-
export type ReqFrame = {
|
|
4
|
-
type: 'req';
|
|
5
|
-
id: string;
|
|
6
|
-
method: ReqMethod;
|
|
7
|
-
params: Record<string, unknown>;
|
|
8
|
-
traceId?: string;
|
|
9
|
-
};
|
|
10
|
-
export type ResFrame = {
|
|
11
|
-
type: 'res';
|
|
12
|
-
id: string;
|
|
13
|
-
ok: boolean;
|
|
14
|
-
payload?: unknown;
|
|
15
|
-
error?: string;
|
|
16
|
-
/** Structured, machine-actionable rejection. Clients must not parse `error`. */
|
|
17
|
-
rejection?: SessionSyncRejection;
|
|
18
|
-
traceId?: string;
|
|
19
|
-
};
|
|
20
|
-
export type EventFrame = {
|
|
21
|
-
type: 'event';
|
|
22
|
-
event: string;
|
|
23
|
-
payload?: unknown;
|
|
24
|
-
seq?: number;
|
|
25
|
-
id?: string;
|
|
26
|
-
traceId?: string;
|
|
27
|
-
};
|
|
28
|
-
export type Frame = ReqFrame | ResFrame | EventFrame;
|
|
29
|
-
export type RoutedFrame = {
|
|
30
|
-
type: 'relay';
|
|
31
|
-
machineId: string;
|
|
32
|
-
frame: Frame;
|
|
33
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { PersonalSyncIdentity } from './session-sync.ts';
|
|
2
|
-
export type FsEntry = {
|
|
3
|
-
name: string;
|
|
4
|
-
path: string;
|
|
5
|
-
isDir: boolean;
|
|
6
|
-
size?: number;
|
|
7
|
-
modifiedAt?: number;
|
|
8
|
-
};
|
|
9
|
-
export type FsTransferRequest = {
|
|
10
|
-
transferId: string;
|
|
11
|
-
direction: 'upload' | 'download';
|
|
12
|
-
path?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
size?: number;
|
|
15
|
-
mimeType?: string;
|
|
16
|
-
targetPath?: string;
|
|
17
|
-
/** Base64-encoded file content for single-shot uploads (< 5 MB) */
|
|
18
|
-
data?: string;
|
|
19
|
-
};
|
|
20
|
-
export type FsChunk = {
|
|
21
|
-
transferId: string;
|
|
22
|
-
seq: number;
|
|
23
|
-
total: number;
|
|
24
|
-
data: string;
|
|
25
|
-
};
|
|
26
|
-
export type FsTransferManifestEntry = {
|
|
27
|
-
relativePath: string;
|
|
28
|
-
size: number;
|
|
29
|
-
sha256: string;
|
|
30
|
-
mimeType?: string;
|
|
31
|
-
modifiedAt?: number;
|
|
32
|
-
};
|
|
33
|
-
export type FsTransferStartParams = PersonalSyncIdentity & {
|
|
34
|
-
transferId: string;
|
|
35
|
-
rootPath: string;
|
|
36
|
-
name: string;
|
|
37
|
-
totalSize: number;
|
|
38
|
-
sha256: string;
|
|
39
|
-
mimeType: string;
|
|
40
|
-
kind: 'file' | 'folder';
|
|
41
|
-
manifest?: FsTransferManifestEntry[];
|
|
42
|
-
};
|
|
43
|
-
export type FsTransferStartResult = PersonalSyncIdentity & {
|
|
44
|
-
transferId: string;
|
|
45
|
-
path: string;
|
|
46
|
-
reused: boolean;
|
|
47
|
-
offsets: Record<string, number>;
|
|
48
|
-
attachment?: FsTransferFinishResult;
|
|
49
|
-
};
|
|
50
|
-
export type FsTransferChunkParams = PersonalSyncIdentity & {
|
|
51
|
-
transferId: string;
|
|
52
|
-
rootPath: string;
|
|
53
|
-
offset: number;
|
|
54
|
-
data: string;
|
|
55
|
-
relativePath?: string;
|
|
56
|
-
};
|
|
57
|
-
export type FsTransferFinishParams = PersonalSyncIdentity & {
|
|
58
|
-
transferId: string;
|
|
59
|
-
rootPath: string;
|
|
60
|
-
};
|
|
61
|
-
export type FsTransferFinishResult = PersonalSyncIdentity & {
|
|
62
|
-
transferId: string;
|
|
63
|
-
path: string;
|
|
64
|
-
name: string;
|
|
65
|
-
mimeType: string;
|
|
66
|
-
kind: 'file' | 'folder';
|
|
67
|
-
byteSize: number;
|
|
68
|
-
sha256: string;
|
|
69
|
-
reused: boolean;
|
|
70
|
-
};
|
|
71
|
-
export type FsTransferAbortParams = PersonalSyncIdentity & {
|
|
72
|
-
transferId: string;
|
|
73
|
-
rootPath: string;
|
|
74
|
-
};
|
|
75
|
-
export type FsTransferChunkResult = PersonalSyncIdentity & {
|
|
76
|
-
transferId: string;
|
|
77
|
-
written: number;
|
|
78
|
-
nextOffset: number;
|
|
79
|
-
};
|
|
80
|
-
export type FsTransferAbortResult = PersonalSyncIdentity & {
|
|
81
|
-
transferId: string;
|
|
82
|
-
aborted: true;
|
|
83
|
-
};
|
|
84
|
-
/** Stable input for the aggregate hash of a folder transfer. */
|
|
85
|
-
export declare function serializeFsTransferManifest(entries: readonly FsTransferManifestEntry[]): string;
|
|
86
|
-
export type FsRenameResult = {
|
|
87
|
-
oldPath: string;
|
|
88
|
-
newPath: string;
|
|
89
|
-
entry: FsEntry;
|
|
90
|
-
};
|
|
91
|
-
export type FsWriteResult = {
|
|
92
|
-
path: string;
|
|
93
|
-
size: number;
|
|
94
|
-
modifiedAt: number;
|
|
95
|
-
};
|
|
96
|
-
export type FsMarkdownPdfExportResult = {
|
|
97
|
-
sourcePath: string;
|
|
98
|
-
outputPath: string;
|
|
99
|
-
entry: FsEntry;
|
|
100
|
-
};
|
|
101
|
-
export type FsArchiveZipResult = {
|
|
102
|
-
sourcePath: string;
|
|
103
|
-
outputPath: string;
|
|
104
|
-
entry: FsEntry;
|
|
105
|
-
fileCount: number;
|
|
106
|
-
totalSize: number;
|
|
107
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from './envelope.ts';
|
|
2
|
-
export * from './events.ts';
|
|
3
|
-
export * from './machine.ts';
|
|
4
|
-
export * from './methods.ts';
|
|
5
|
-
export * from './frames.ts';
|
|
6
|
-
export * from './fs.ts';
|
|
7
|
-
export * from './session.ts';
|
|
8
|
-
export * from './session-sync.ts';
|
|
9
|
-
export * from './message-payload.ts';
|
|
10
|
-
export * from './external-message-format.ts';
|
|
11
|
-
export * from './native-session.ts';
|
|
12
|
-
export * from './tool-detail.ts';
|
|
13
|
-
export * from './voice-chief.ts';
|
|
14
|
-
export * from './project.ts';
|
|
15
|
-
export * from './project-fs.ts';
|
|
16
|
-
export * from './room.ts';
|
|
17
|
-
export * from './agent-capabilities.ts';
|
|
18
|
-
export * from './agent-workspace.ts';
|
|
19
|
-
export * from './relay-connectivity.ts';
|
|
20
|
-
export * from './project-path.ts';
|
|
21
|
-
export * from './schedule.ts';
|