dal-code 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/bun/register-bedrock.js +1 -0
- package/dist/cli/experimental/auth.js +1 -0
- package/dist/cli/experimental/cli.js +1 -0
- package/dist/cli/experimental/command-options.js +1 -0
- package/dist/cli/experimental/command.js +1 -0
- package/dist/cli/experimental/commands/client.js +1 -0
- package/dist/cli/experimental/commands/pi.js +1 -0
- package/dist/cli/experimental/commands/server.js +1 -0
- package/dist/cli/experimental/transport-address.js +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/remote-session.js +1 -0
- package/dist/client/transcript.js +1 -0
- package/dist/core/extensions/engine-specifiers.js +1 -1
- package/dist/core/extensions/virtual-modules.js +1 -1
- package/dist/core/provider-attribution.js +1 -0
- package/dist/modes/interactive/components/daxnuts.js +1 -0
- package/dist/modes/interactive/theme/theme-json.js +12 -0
- package/dist/modes/interactive/theme/theme-schema.json +356 -0
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-guard/src/workspace.js +2 -2
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-office/src/render/capture.js +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-sync/package.json +5 -4
- package/dist/node_modules/@dalcode/dal-sync/src/client.d.ts +12 -0
- package/dist/node_modules/@dalcode/dal-sync/src/core.d.ts +68 -0
- package/dist/node_modules/@dalcode/dal-sync/src/core.js +2 -2
- package/dist/node_modules/@dalcode/dal-sync/src/host.d.ts +25 -0
- package/dist/node_modules/@dalcode/dal-sync/src/host.js +2 -0
- package/dist/node_modules/@dalcode/dal-sync/src/index.js +3 -4
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +37 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +104 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +16 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +10 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +17 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bash.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bounded.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/chord.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/context.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/harness.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/hooks.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/jsonl.js +4 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/collapse.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/entries.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/frames.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/generation.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/job.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/plugin.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/post-tools.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/task-api.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/tool.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/membrane.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/memory.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/scheduler.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/session.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/system.js +8 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/view.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +8 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +10 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +2 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +12 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +16 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +14 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.js +74 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/dist/sdk/sync.d.ts +2 -0
- package/dist/sdk/sync.js +1 -0
- package/dist/server/create-harness.js +1 -0
- package/dist/utils/clipboard-native.js +1 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
-
"@dalcode/dal-skills": "1.0.
|
|
25
|
-
"@dalcode/deepailab": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
24
|
+
"@dalcode/dal-skills": "1.0.49",
|
|
25
|
+
"@dalcode/deepailab": "1.0.49",
|
|
26
26
|
"typebox": "1.3.27"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-recall",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Search past sessions: a local full-text index of earlier conversations the model can query with session_search. Adapted from @henryqw/pi-session-recall 5.1.4 (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
24
24
|
"typebox": "1.3.27"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-remote",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "`dal remote enable|disable|status|pair|logs`: installs the phone daemon (a pinned, integrity-checked npm package) and runs it as a systemd user service or a launchd agent, so the DAL Code phone app can reach this machine.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.49"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-review",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Code review: a read-only reviewer sub-agent over uncommitted changes, a base branch, a commit, a PR or a supplied diff, returning structured, deduplicated findings. /review in the TUI, dal -p, RPC and the SDK.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
-
"@dalcode/dal-subagent": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
23
|
+
"@dalcode/dal-subagent": "1.0.49",
|
|
24
24
|
"typebox": "1.3.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-rewind",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Git checkpoints for DAL: a snapshot after every turn that changes files, /rewind, Esc+Esc, safe restore, undo. Adapted from pi-rewind 0.5.0 (MIT, arpagon).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.49"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dalcode/dal-guard": "1.0.
|
|
33
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
34
|
-
"@dalcode/dal-tool-catalog": "1.0.
|
|
35
|
-
"@dalcode/deepailab": "1.0.
|
|
36
|
-
"@earendil-works/pi-tui": "1.0.
|
|
32
|
+
"@dalcode/dal-guard": "1.0.49",
|
|
33
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
34
|
+
"@dalcode/dal-tool-catalog": "1.0.49",
|
|
35
|
+
"@dalcode/deepailab": "1.0.49",
|
|
36
|
+
"@earendil-works/pi-tui": "1.0.49"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@earendil-works/pi-coding-agent": "^1.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-rtk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Uses rtk, when the user has installed it, to compress the output of shell commands the agent runs. Does nothing when rtk is not installed; never installs it.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.49"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
26
|
-
"@dalcode/deepailab": "1.0.
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
26
|
+
"@dalcode/deepailab": "1.0.49",
|
|
27
27
|
"typebox": "1.3.7"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-statusline",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "A scriptable status line under the footer: a template or a command of the user's choosing. Grown from the status-line and custom-footer extension examples.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.49"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-structured",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "dal -p --output-schema: the final answer as JSON that matches a JSON Schema, with a non-zero exit when it does not. Grown from the structured-output extension example.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
22
22
|
"typebox": "1.3.27"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-subagent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
-
"@dalcode/dal-guard": "1.0.
|
|
23
|
-
"@earendil-works/pi-agent-core": "1.0.
|
|
24
|
-
"@earendil-works/pi-ai": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
22
|
+
"@dalcode/dal-guard": "1.0.49",
|
|
23
|
+
"@earendil-works/pi-agent-core": "1.0.49",
|
|
24
|
+
"@earendil-works/pi-ai": "1.0.49",
|
|
25
25
|
"typebox": "1.3.7"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-sync",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Opt-in sync of personal skills and personal lessons through the signed-in DeepAILab account, so other computers pick them up (/sync).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./src/index.js",
|
|
11
11
|
"./core": "./src/core.js",
|
|
12
|
+
"./host": "./src/host.js",
|
|
12
13
|
"./package.json": "./package.json"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
]
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-learn": "1.0.
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/deepailab": "1.0.
|
|
24
|
+
"@dalcode/dal-learn": "1.0.49",
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
26
|
+
"@dalcode/deepailab": "1.0.49"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SyncRemote } from "./core.js";
|
|
2
|
+
export interface HttpRemoteOptions {
|
|
3
|
+
readonly apiBase: string;
|
|
4
|
+
readonly token: () => Promise<string | undefined>;
|
|
5
|
+
readonly device: string;
|
|
6
|
+
readonly fetch?: typeof fetch;
|
|
7
|
+
readonly timeoutMs?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface HttpRemote extends SyncRemote {
|
|
10
|
+
removeAll(): Promise<number>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createHttpRemote(options: HttpRemoteOptions): HttpRemote;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type SyncKind = "skill" | "lesson";
|
|
2
|
+
export declare const MAX_ITEM_BYTES: number;
|
|
3
|
+
export interface LocalItem {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly kind: SyncKind;
|
|
6
|
+
readonly content: Record<string, unknown>;
|
|
7
|
+
readonly hash: string;
|
|
8
|
+
readonly updatedAt: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RemoteEntry {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly kind: SyncKind;
|
|
13
|
+
readonly version: number;
|
|
14
|
+
readonly updatedAt: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ItemState {
|
|
17
|
+
version: number;
|
|
18
|
+
hash: string;
|
|
19
|
+
remoteDeleted?: boolean;
|
|
20
|
+
refused?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SyncState {
|
|
23
|
+
account: string;
|
|
24
|
+
items: Record<string, ItemState>;
|
|
25
|
+
lastRun?: string;
|
|
26
|
+
lastError?: string;
|
|
27
|
+
lastErrorStatus?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface SyncRemote {
|
|
30
|
+
manifest(): Promise<RemoteEntry[]>;
|
|
31
|
+
get(id: string): Promise<{
|
|
32
|
+
version: number;
|
|
33
|
+
content: Record<string, unknown>;
|
|
34
|
+
} | undefined>;
|
|
35
|
+
put(id: string, kind: SyncKind, baseVersion: number, content: Record<string, unknown>): Promise<{
|
|
36
|
+
status: "written";
|
|
37
|
+
version: number;
|
|
38
|
+
} | {
|
|
39
|
+
status: "conflict";
|
|
40
|
+
} | {
|
|
41
|
+
status: "refused";
|
|
42
|
+
reason: string;
|
|
43
|
+
}>;
|
|
44
|
+
remove(id: string): Promise<boolean>;
|
|
45
|
+
}
|
|
46
|
+
export interface SyncReport {
|
|
47
|
+
uploaded: number;
|
|
48
|
+
downloaded: number;
|
|
49
|
+
deletedRemote: number;
|
|
50
|
+
conflicts: number;
|
|
51
|
+
refused: string[];
|
|
52
|
+
}
|
|
53
|
+
export declare class SyncHttpError extends Error {
|
|
54
|
+
readonly status: number;
|
|
55
|
+
constructor(status: number);
|
|
56
|
+
}
|
|
57
|
+
export declare const skillsDir: (agentDir: string) => string;
|
|
58
|
+
export declare const userLessonsDir: (agentDir: string) => string;
|
|
59
|
+
export declare const statePath: (agentDir: string) => string;
|
|
60
|
+
export declare function contentHash(content: Record<string, unknown>): string;
|
|
61
|
+
export declare function newSyncId(): string;
|
|
62
|
+
export declare function readLocalItems(agentDir: string): LocalItem[];
|
|
63
|
+
export declare function applyRemoteItem(agentDir: string, id: string, content: Record<string, unknown>, neverSynced?: (syncId: string) => boolean): void;
|
|
64
|
+
export declare function removeLocalItem(agentDir: string, id: string): void;
|
|
65
|
+
export declare function readState(agentDir: string): SyncState | undefined;
|
|
66
|
+
export declare function writeState(agentDir: string, state: SyncState): void;
|
|
67
|
+
export declare function clearState(agentDir: string): void;
|
|
68
|
+
export declare function runSync(agentDir: string, account: string, remote: SyncRemote): Promise<SyncReport>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var u=(e,s)=>Q(e,"name",{value:s,configurable:!0});var U=Object.defineProperty,a=u((e,s)=>U(e,"name",{value:s,configurable:!0}),"c");import{createHash as Z,randomBytes as tt}from"node:crypto";import{existsSync as N,mkdirSync as
|
|
2
|
-
`,{mode:384}))}u(M,"U"),a(M,"writeState");function Y(e){F(L(e),{force:!0})}u(Y,"ae"),a(Y,"clearState");async function G(e,s,n){const
|
|
1
|
+
var Q=Object.defineProperty;var u=(e,s)=>Q(e,"name",{value:s,configurable:!0});var U=Object.defineProperty,a=u((e,s)=>U(e,"name",{value:s,configurable:!0}),"c");import{createHash as Z,randomBytes as tt}from"node:crypto";import{existsSync as N,mkdirSync as E,readdirSync as et,readFileSync as B,rmSync as F,statSync as st}from"node:fs";import{join as p}from"node:path";import{readLessons as C,updateLessons as O}from"@dalcode/dal-learn/lessons";import{redact as P}from"@dalcode/dal-learn/safety";import{withFileLockSync as nt,writeFileAtomicSync as W}from"@dalcode/dal-pi-kit";const z=256*1024,$=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,K=1;class ot extends Error{static{u(this,"ie")}static{a(this,"SyncHttpError")}status;constructor(s){super(`dal sync request failed (${s})`),this.status=s}}const w=a(e=>p(e,"skills"),"skillsDir"),b=a(e=>p(e,"learned","user"),"userLessonsDir"),L=a(e=>p(e,"sync","state.json"),"statePath");function j(e){return Array.isArray(e)?`[${e.map(j).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).filter(([,s])=>s!==void 0).sort(([s],[n])=>s<n?-1:s>n?1:0).map(([s,n])=>`${JSON.stringify(s)}:${j(n)}`).join(",")}}`:JSON.stringify(e)}u(j,"E"),a(j,"stable");function S(e){return Z("sha256").update(j(e)).digest("hex")}u(S,"I"),a(S,"contentHash");function A(e){return typeof e=="string"?P(e):Array.isArray(e)?e.map(A):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([s,n])=>[s,A(n)])):e}u(A,"A"),a(A,"redactDeep");const T=["section","content","rootCause","signature","fix","status","risk","helpful","harmful","created","updated","activatedAt","activatedBy","lastHelpfulAt","retiredAt","retiredReason"];function V(e){const s={};for(const n of T)e[n]!==void 0&&(s[n]=e[n]);return A(s)}u(V,"z"),a(V,"lessonContent");function _(e){const s=w(e);if(!N(s))return[];const n=[];for(const i of et(s)){if(!$.test(i)||i.length>64)continue;const r=p(s,i,"SKILL.md");let d,y;try{const c=st(r);if(!c.isFile())continue;d=B(r,"utf8"),y=c.mtimeMs}catch{continue}const m={name:i,body:P(d)};n.push({id:`skill.${i}`,kind:"skill",content:m,hash:S(m),updatedAt:y})}return n}u(_,"q"),a(_,"readSkills");function q(e){const s=b(e);return N(p(s,"lessons.json"))?(C(s).lessons.some(n=>n.scope==="user"&&!n.syncId)&&O(s,n=>({...n,lessons:n.lessons.map(i=>i.scope==="user"&&!i.syncId?{...i,syncId:x()}:i)})),C(s).lessons.filter(n=>n.scope==="user"&&typeof n.syncId=="string").map(n=>{const i=V(n);return{id:`lesson.${n.syncId}`,kind:"lesson",content:i,hash:S(i),updatedAt:Date.parse(n.updated)||0}})):[]}u(q,"X"),a(q,"readLessonItems");function x(){return tt(8).toString("hex")}u(x,"Y"),a(x,"newSyncId");function D(e){return[..._(e),...q(e)]}u(D,"J"),a(D,"readLocalItems");function R(e,s,n,i=()=>!1){if(s.startsWith("skill.")){const c=s.slice(6);if(!$.test(c)||typeof n.body!="string")return;E(p(w(e),c),{recursive:!0}),W(p(w(e),c,"SKILL.md"),n.body);return}if(!s.startsWith("lesson."))return;const r=s.slice(7),d={};for(const c of T)n[c]!==void 0&&(d[c]=n[c]);const y=d.content;if(typeof y!="string"||!y)return;const m=b(e);E(m,{recursive:!0,mode:448}),O(m,c=>{const v=c.lessons,I=v.find(f=>f.syncId===r)??v.find(f=>f.scope==="user"&&(!f.syncId||i(f.syncId))&&f.content===d.content);if(I)return{...c,lessons:v.map(f=>f===I?{...f,...d,syncId:r}:f)};const g=new Date().toISOString(),k={id:`u-${String(c.nextId).padStart(4,"0")}`,scope:"user",section:"general",rootCause:"",status:"candidate",risk:[],sessions:[],evidence:[],helpful:0,harmful:0,feedback:[],created:g,updated:g,...d,content:y,syncId:r};return{...c,nextId:c.nextId+1,lessons:[...v,k]}})}u(R,"G"),a(R,"applyRemoteItem");function X(e,s){if(s.startsWith("skill.")){const i=s.slice(6);$.test(i)&&F(p(w(e),i),{recursive:!0,force:!0});return}const n=s.slice(7);O(b(e),i=>({...i,lessons:i.lessons.filter(r=>r.syncId!==n)}))}u(X,"ce"),a(X,"removeLocalItem");function H(e){try{const s=JSON.parse(B(L(e),"utf8"));if(s.formatVersion!==K||typeof s.account!="string")return;const n=s.items&&typeof s.items=="object"?s.items:{};return{account:s.account,items:n,lastRun:typeof s.lastRun=="string"?s.lastRun:void 0,lastError:typeof s.lastError=="string"?s.lastError:void 0,lastErrorStatus:typeof s.lastErrorStatus=="number"?s.lastErrorStatus:void 0}}catch{return}}u(H,"Q"),a(H,"readState");function M(e,s){const n=L(e);E(p(e,"sync"),{recursive:!0,mode:448}),nt(n,()=>W(n,`${JSON.stringify({formatVersion:K,...s},null," ")}
|
|
2
|
+
`,{mode:384}))}u(M,"U"),a(M,"writeState");function Y(e){F(L(e),{force:!0})}u(Y,"ae"),a(Y,"clearState");async function G(e,s,n){const i=H(e),r={account:s,items:i?.account===s?{...i.items}:{}},d={uploaded:0,downloaded:0,deletedRemote:0,conflicts:0,refused:[]},y=a(()=>M(e,{...r,lastRun:new Date().toISOString()}),"save"),m=new Map((await n.manifest()).map(t=>[t.id,t]));let c=new Map(D(e).map(t=>[t.id,t]));const v=a(t=>{const o=`lesson.${t}`;return!r.items[o]&&!m.has(o)},"neverSynced"),I=new Set,g=a((t,o)=>{R(e,t,o.content,v),r.items[t]={version:o.version,hash:S(o.content)},I.add(t),d.downloaded++},"apply"),k=a(async t=>{const o=await n.get(t);return o?(g(t,o),!0):!1},"download"),f=a(async(t,o)=>{const l=r.items[t.id];if(l?.refused===t.hash)return;if(Buffer.byteLength(JSON.stringify(t.content))>z){r.items[t.id]={version:l?.version??0,hash:l?.hash??"",refused:t.hash},d.refused.push(t.id);return}const h=await n.put(t.id,t.kind,o,t.content);h.status==="written"?(r.items[t.id]={version:h.version,hash:t.hash},d.uploaded++):h.status==="conflict"?d.conflicts++:(r.items[t.id]={version:l?.version??0,hash:l?.hash??"",refused:t.hash},d.refused.push(t.id))},"upload");for(const t of m.values()){const o=r.items[t.id]?.remoteDeleted?void 0:r.items[t.id],l=c.get(t.id);if(!l){if(o&&o.version===t.version){await n.remove(t.id)&&d.deletedRemote++,delete r.items[t.id];continue}await k(t.id);continue}if(o&&o.version===t.version)continue;if(o&&l.hash===o.hash){await k(t.id);continue}const h=await n.get(t.id);if(!h)continue;const J=S(h.content);if(J===l.hash){r.items[t.id]={version:h.version,hash:J};continue}d.conflicts++,Date.parse(t.updatedAt)>l.updatedAt?g(t.id,h):await f(l,h.version)}c=new Map(D(e).map(t=>[t.id,t]));for(const t of I){const o=c.get(t);o&&r.items[t]&&(r.items[t].hash=o.hash)}for(const t of c.values()){const o=r.items[t.id],l=m.get(t.id);if(l){o&&o.version===l.version&&t.hash!==o.hash&&await f(t,l.version);continue}if(o&&t.hash===o.hash){!o.remoteDeleted&&o.version>0&&(r.items[t.id]={...o,remoteDeleted:!0});continue}await f(t,0)}for(const t of Object.keys(r.items))!c.has(t)&&!m.has(t)&&delete r.items[t];return y(),d}u(G,"de"),a(G,"runSync");export{z as MAX_ITEM_BYTES,ot as SyncHttpError,R as applyRemoteItem,Y as clearState,S as contentHash,x as newSyncId,D as readLocalItems,H as readState,X as removeLocalItem,G as runSync,w as skillsDir,L as statePath,b as userLessonsDir,M as writeState};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type HttpRemote } from "./client.js";
|
|
2
|
+
import { type SyncReport } from "./core.js";
|
|
3
|
+
export declare const SETTINGS_KEY = "dalSync";
|
|
4
|
+
export declare const SYNC_CONSOLE_URL = "https://deepailab.ai/dal-sync";
|
|
5
|
+
export declare function syncEnabled(agentDir: string): boolean;
|
|
6
|
+
export declare function saveSyncEnabled(agentDir: string, enabled: boolean): void;
|
|
7
|
+
export declare function syncErrorStatus(error: unknown): number;
|
|
8
|
+
export declare function syncErrorText(error: unknown): string;
|
|
9
|
+
export interface SyncStatus {
|
|
10
|
+
readonly enabled: boolean;
|
|
11
|
+
readonly synced: number;
|
|
12
|
+
readonly lastRun?: string;
|
|
13
|
+
readonly lastError?: string;
|
|
14
|
+
readonly lastErrorStatus?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function syncStatus(agentDir: string): SyncStatus;
|
|
17
|
+
export interface SyncConnection {
|
|
18
|
+
readonly apiBase: string;
|
|
19
|
+
readonly token: () => Promise<string | undefined>;
|
|
20
|
+
readonly device: string;
|
|
21
|
+
readonly fetch?: typeof fetch;
|
|
22
|
+
}
|
|
23
|
+
export declare function syncRemote(connection: SyncConnection): HttpRemote;
|
|
24
|
+
export declare function syncOnce(agentDir: string, account: string, remote: HttpRemote): Promise<SyncReport>;
|
|
25
|
+
export declare function removeCloudCopies(agentDir: string, remote: HttpRemote): Promise<number>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var v=Object.defineProperty;var n=(u,t)=>v(u,"name",{value:t,configurable:!0});var w=Object.defineProperty,a=n((u,t)=>w(u,"name",{value:t,configurable:!0}),"o");import{existsSync as b,readFileSync as B}from"node:fs";import{join as g}from"node:path";import{declaredDataFormat as h,t as o,withFileLockSync as R,writeFileAtomicSync as O}from"@dalcode/dal-pi-kit";import{createHttpRemote as N}from"./client.js";import{clearState as L,readState as S,runSync as j,SyncHttpError as x,writeState as J}from"./core.js";const c="dalSync",T="https://deepailab.ai/dal-sync",A=a(u=>g(u,"settings.json"),"settingsPath");function i(u){try{const t=JSON.parse(B(u,"utf8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}catch{return}}n(i,"c"),a(i,"readJson");function E(u){return process.env.DAL_SYNC==="0"?!1:i(A(u))?.[c]?.enabled===!0}n(E,"k"),a(E,"syncEnabled");function d(u,t){const r=A(u);R(r,()=>{if(b(r)&&i(r)===void 0)throw new Error(`${r} is not valid JSON; not overwriting it`);const s=i(r)??{};if(h(s)>1)throw new Error(`${r} was written by a newer DAL; not overwriting it`);const e=s[c]??{};s[c]={...e,enabled:t},O(r,`${JSON.stringify(s,null,2)}
|
|
2
|
+
`)})}n(d,"P"),a(d,"saveSyncEnabled");function f(u,t){return u.replace(/\{(\w+)\}/g,(r,s)=>s in t?String(t[s]):r)}n(f,"A"),a(f,"fill");function l(u){return u instanceof x?u.status:0}n(l,"f"),a(l,"syncErrorStatus");function F(u){const t=l(u);return t===401?o("\u672A\u767B\u5F55 DeepAILab\uFF0C\u6216\u767B\u5F55\u5DF2\u8FC7\u671F\uFF1B\u767B\u5F55\u540E\u4F1A\u81EA\u52A8\u7EE7\u7EED\u540C\u6B65\u3002"):t===404?o("\u540C\u6B65\u670D\u52A1\u5C1A\u672A\u5F00\u653E\uFF0C\u5F00\u653E\u540E\u4F1A\u81EA\u52A8\u5F00\u59CB\u3002"):t===503?o("\u540C\u6B65\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u7A0D\u540E\u81EA\u52A8\u91CD\u8BD5\u3002"):t?f(o("\u540C\u6B65\u8BF7\u6C42\u5931\u8D25\uFF08{status}\uFF09\uFF0C\u7A0D\u540E\u81EA\u52A8\u91CD\u8BD5\u3002"),{status:t}):o("\u7F51\u7EDC\u4E0D\u53EF\u7528\uFF0C\u7A0D\u540E\u81EA\u52A8\u91CD\u8BD5\u3002")}n(F,"C"),a(F,"syncErrorText");function C(u){const t=S(u),r=t?Object.values(t.items).filter(s=>!s.remoteDeleted&&s.version>0).length:0;return{enabled:E(u),synced:r,...t?.lastRun?{lastRun:t.lastRun}:{},...t?.lastError?{lastError:t.lastError}:{},...t?.lastError&&t.lastErrorStatus!==void 0?{lastErrorStatus:t.lastErrorStatus}:{}}}n(C,"_"),a(C,"syncStatus");function m(u){return N(u)}n(m,"T"),a(m,"syncRemote");async function D(u,t,r){try{return await j(u,t,r)}catch(s){const e=S(u),y=e?.account===t;throw J(u,{account:t,items:y?e.items:{},lastRun:y?e.lastRun:void 0,lastError:F(s),lastErrorStatus:l(s)}),s}}n(D,"Y"),a(D,"syncOnce");async function p(u,t){const r=await t.removeAll();return L(u),r}n(p,"$"),a(p,"removeCloudCopies");export{c as SETTINGS_KEY,T as SYNC_CONSOLE_URL,p as removeCloudCopies,d as saveSyncEnabled,E as syncEnabled,l as syncErrorStatus,F as syncErrorText,D as syncOnce,m as syncRemote,C as syncStatus};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)})
|
|
3
|
-
`)},"
|
|
4
|
-
`)},"status");t.registerCommand("sync",{description:r("\u540C\u6B65\u4E2A\u4EBA\u6280\u80FD\u548C\u4E2A\u4EBA\u7ECF\u9A8C\u5230 DeepAILab \u8D26\u6237\uFF08/sync on | off | now | status\uFF09"),getArgumentCompletions:o(s=>{const u=["on","off","now","status"].filter(n=>n.startsWith(s.trim()));return u.length?u.map(n=>({value:n,label:n})):null},"getArgumentCompletions"),handler:o(async(s,u)=>{const[n="status",A]=s.trim().toLowerCase().split(/\s+/);if(n==="status"||n===""){i(u,I());return}if(n==="on"){m(e,!0),i(u,r("\u5DF2\u5F00\u542F\u3002\u4F1A\u540C\u6B65\uFF1A\u4F60\u7684\u4E2A\u4EBA\u6280\u80FD\uFF08~/.dal/agent/skills\uFF09\u548C\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u4E2A\u4EBA\u7ECF\u9A8C\u3002\u4E0D\u4F1A\u540C\u6B65\uFF1A\u9879\u76EE\u7ECF\u9A8C\u3001\u5BF9\u8BDD\u3001\u4EE3\u7801\u3001\u8BBE\u7F6E\u548C\u4EFB\u4F55\u51ED\u636E\u3002\u4E0A\u4F20\u524D\u4F1A\u53BB\u6389\u5BC6\u94A5\u3001\u5BC6\u7801\u548C\u4E3B\u76EE\u5F55\u8DEF\u5F84\u3002"));try{i(u,p(await B(u)))}catch(E){i(u,d(E),"warning")}return}if(n==="now"){if(!C(e)){i(u,r("\u540C\u6B65\u672A\u5F00\u542F\uFF0C\u5148\u8FD0\u884C /sync on\u3002"),"warning");return}try{i(u,p(await B(u)))}catch(E){i(u,d(E),"warning")}return}if(n==="off"){if(m(e,!1),!(A==="--delete-cloud"||u.hasUI&&await u.ui.confirm(r("\u5173\u95ED\u540C\u6B65"),r("\u540C\u65F6\u5220\u9664\u4E91\u7AEF\u7684\u526F\u672C\u5417\uFF1F\u7535\u8111\u4E0A\u7684\u6280\u80FD\u548C\u7ECF\u9A8C\u4E0D\u53D7\u5F71\u54CD\u3002")))){i(u,c(r("\u5DF2\u5173\u95ED\uFF0C\u4E0D\u518D\u4E0A\u4F20\u3002\u4E91\u7AEF\u526F\u672C\u4FDD\u7559\uFF0C\u53EF\u5728 {url} \u5220\u9664\u3002"),{url:v}));return}try{const E=await w(u).removeAll();K(e),i(u,c(r("\u5DF2\u5173\u95ED\uFF0C\u5E76\u5220\u9664\u4E86\u4E91\u7AEF\u7684 {n} \u6761\u3002"),{n:E}))}catch(E){i(u,`${r("\u5DF2\u5173\u95ED\uFF0C\u4F46\u4E91\u7AEF\u526F\u672C\u6CA1\u6709\u5220\u9664\uFF1A")}${d(E)}`,"warning")}return}i(u,r("\u7528\u6CD5\uFF1A/sync on | off | now | status"),"warning")},"handler")})}l(R,"W"),o(R,"default");export{D as SETTINGS_KEY,R as default,m as saveSyncEnabled,C as syncEnabled};
|
|
1
|
+
var b=Object.defineProperty;var l=(o,n)=>b(o,"name",{value:n,configurable:!0});var S=Object.defineProperty,a=l((o,n)=>S(o,"name",{value:n,configurable:!0}),"i");import{hostname as T}from"node:os";import{t as s}from"@dalcode/dal-pi-kit";import{deepAILabApiBase as R,resolveDeepAILabAccessToken as B}from"@dalcode/deepailab";import{decodeJwtPayload as I}from"@dalcode/deepailab/oidc";import{getAgentDir as L,VERSION as O}from"@earendil-works/pi-coding-agent";import{readState as _,SyncHttpError as j}from"./core.js";import{SYNC_CONSOLE_URL as y,syncErrorText as d,removeCloudCopies as k,syncOnce as N,saveSyncEnabled as g,syncEnabled as C,syncRemote as P}from"./host.js";import{SETTINGS_KEY as U,saveSyncEnabled as $,syncEnabled as Y}from"./host.js";const x=2e4,G="DALCODE_GATEWAY_URL";function r(o,n){return o.replace(/\{(\w+)\}/g,(c,E)=>E in n?String(n[E]):c)}l(r,"u"),a(r,"fill");function f(o){const n=[r(s("\u4E0A\u4F20 {n}"),{n:o.uploaded}),r(s("\u4E0B\u8F7D {n}"),{n:o.downloaded})];return o.deletedRemote&&n.push(r(s("\u4E91\u7AEF\u5220\u9664 {n}"),{n:o.deletedRemote})),o.conflicts&&n.push(r(s("\u51B2\u7A81 {n}\uFF08\u6309\u8F83\u65B0\u7684\u4FEE\u6539\u5904\u7406\uFF09"),{n:o.conflicts})),o.refused.length&&n.push(r(s("\u672A\u4E0A\u4F20 {n}\uFF08\u8FC7\u5927\u6216\u7591\u4F3C\u542B\u5BC6\u94A5\uFF09"),{n:o.refused.length})),n.join(s("\uFF0C"))}l(f,"C"),a(f,"reportText");function w(o){const n=L();let c=Promise.resolve(),E;const F=a((e,u,t="info")=>{e.hasUI?e.ui.notify(u,t):process.stdout.write(`${u}
|
|
2
|
+
`)},"say"),D=a(e=>P({apiBase:R(),token:a(()=>B(e.modelRegistry),"token"),device:`${T()} (dal ${O})`}),"remoteFor"),h=a(async e=>{const u=await B(e.modelRegistry),t=u?I(u)?.sub:void 0;return typeof t=="string"&&t?t:void 0},"accountOf"),A=a(async e=>{const u=await h(e);if(!u)throw new j(401);return N(n,u,D(e))},"syncOnce"),p=a(e=>{if(!C(n)||!e.hasUI||process.env[G])return;const u=a(()=>A(e),"work");c=c.then(u,u).catch(()=>{})},"background");o.on("session_start",(e,u)=>{u.mode==="print"||u.mode==="json"||p(u)}),o.on("agent_end",(e,u)=>{u.mode==="print"||u.mode==="json"||!C(n)||(E&&clearTimeout(E),E=setTimeout(()=>p(u),x),E.unref?.())}),o.on("session_shutdown",async()=>{E&&clearTimeout(E),await Promise.race([c,new Promise(e=>setTimeout(e,5e3).unref?.())])});const v=a(()=>{const e=C(n),u=_(n),t=[e?s("\u6280\u80FD\u4E0E\u7ECF\u9A8C\u540C\u6B65\uFF1A\u5DF2\u5F00\u542F\u3002"):s("\u6280\u80FD\u4E0E\u7ECF\u9A8C\u540C\u6B65\uFF1A\u672A\u5F00\u542F\uFF08/sync on \u5F00\u542F\uFF09\u3002")];if(u){const m=Object.values(u.items).filter(i=>!i.remoteDeleted&&i.version>0).length;t.push(r(s("\u5DF2\u540C\u6B65 {n} \u6761\u3002"),{n:m})),u.lastRun&&t.push(r(s("\u4E0A\u6B21\u540C\u6B65\uFF1A{time}"),{time:new Date(u.lastRun).toLocaleString()})),u.lastError&&t.push(u.lastError)}return t.push(r(s("\u5728 {url} \u67E5\u770B\u3001\u5220\u9664\u548C\u5BFC\u51FA\u3002"),{url:y})),t.join(`
|
|
3
|
+
`)},"status");o.registerCommand("sync",{description:s("\u540C\u6B65\u4E2A\u4EBA\u6280\u80FD\u548C\u4E2A\u4EBA\u7ECF\u9A8C\u5230 DeepAILab \u8D26\u6237\uFF08/sync on | off | now | status\uFF09"),getArgumentCompletions:a(e=>{const u=["on","off","now","status"].filter(t=>t.startsWith(e.trim()));return u.length?u.map(t=>({value:t,label:t})):null},"getArgumentCompletions"),handler:a(async(e,u)=>{const[t="status",m]=e.trim().toLowerCase().split(/\s+/);if(t==="status"||t===""){F(u,v());return}if(t==="on"){g(n,!0),F(u,s("\u5DF2\u5F00\u542F\u3002\u4F1A\u540C\u6B65\uFF1A\u4F60\u7684\u4E2A\u4EBA\u6280\u80FD\uFF08~/.dal/agent/skills\uFF09\u548C\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u4E2A\u4EBA\u7ECF\u9A8C\u3002\u4E0D\u4F1A\u540C\u6B65\uFF1A\u9879\u76EE\u7ECF\u9A8C\u3001\u5BF9\u8BDD\u3001\u4EE3\u7801\u3001\u8BBE\u7F6E\u548C\u4EFB\u4F55\u51ED\u636E\u3002\u4E0A\u4F20\u524D\u4F1A\u53BB\u6389\u5BC6\u94A5\u3001\u5BC6\u7801\u548C\u4E3B\u76EE\u5F55\u8DEF\u5F84\u3002"));try{F(u,f(await A(u)))}catch(i){F(u,d(i),"warning")}return}if(t==="now"){if(!C(n)){F(u,s("\u540C\u6B65\u672A\u5F00\u542F\uFF0C\u5148\u8FD0\u884C /sync on\u3002"),"warning");return}try{F(u,f(await A(u)))}catch(i){F(u,d(i),"warning")}return}if(t==="off"){if(g(n,!1),!(m==="--delete-cloud"||u.hasUI&&await u.ui.confirm(s("\u5173\u95ED\u540C\u6B65"),s("\u540C\u65F6\u5220\u9664\u4E91\u7AEF\u7684\u526F\u672C\u5417\uFF1F\u7535\u8111\u4E0A\u7684\u6280\u80FD\u548C\u7ECF\u9A8C\u4E0D\u53D7\u5F71\u54CD\u3002")))){F(u,r(s("\u5DF2\u5173\u95ED\uFF0C\u4E0D\u518D\u4E0A\u4F20\u3002\u4E91\u7AEF\u526F\u672C\u4FDD\u7559\uFF0C\u53EF\u5728 {url} \u5220\u9664\u3002"),{url:y}));return}try{const i=await k(n,D(u));F(u,r(s("\u5DF2\u5173\u95ED\uFF0C\u5E76\u5220\u9664\u4E86\u4E91\u7AEF\u7684 {n} \u6761\u3002"),{n:i}))}catch(i){F(u,`${s("\u5DF2\u5173\u95ED\uFF0C\u4F46\u4E91\u7AEF\u526F\u672C\u6CA1\u6709\u5220\u9664\uFF1A")}${d(i)}`,"warning")}return}F(u,s("\u7528\u6CD5\uFF1A/sync on | off | now | status"),"warning")},"handler")})}l(w,"H"),a(w,"default");export{U as SETTINGS_KEY,w as default,$ as saveSyncEnabled,Y as syncEnabled};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-telemetry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dalcode/dal-learn": "1.0.
|
|
29
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
30
|
-
"@dalcode/deepailab": "1.0.
|
|
28
|
+
"@dalcode/dal-learn": "1.0.49",
|
|
29
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
30
|
+
"@dalcode/deepailab": "1.0.49"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-terminal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Host terminal context: a terminal_read tool and @terminal mentions, registered only when the embedding host advertises the terminal capability.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
23
23
|
"typebox": "1.3.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-tool-catalog",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
22
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
23
23
|
"typebox": "1.3.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-usage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "/usage: tokens and cost across all sessions, by day, model and project, with sub-agent spend counted once. Adapted from @tmustier/pi-usage-extension 0.9.5 (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.49"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
28
|
-
"@dalcode/deepailab": "1.0.
|
|
27
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
28
|
+
"@dalcode/deepailab": "1.0.49",
|
|
29
29
|
"typebox": "1.3.27",
|
|
30
30
|
"unpdf": "1.8.1"
|
|
31
31
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-workflow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
20
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
21
21
|
"typebox": "1.3.27"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/deepailab",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
-
"@earendil-works/pi-ai": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.49",
|
|
24
|
+
"@earendil-works/pi-ai": "1.0.49"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|