dal-code 1.0.47 → 1.0.48
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 +4 -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-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-pi-kit/package.json +1 -1
- 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/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-goal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Goal mode for DAL: /goal keeps the agent working on one objective until it is verified complete, with token and continuation limits. Adapted from @narumitw/pi-goal 0.54.11 (MIT, narumiruna); the independent completion check adapts pi-goal-x 0.32.3 (MIT, Lucas).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/dal-subagent": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
25
|
+
"@dalcode/dal-subagent": "1.0.48",
|
|
26
26
|
"typebox": "1.3.27"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-guard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/dal-bridge": "1.0.
|
|
26
|
-
"@dalcode/dal-halo": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
25
|
+
"@dalcode/dal-bridge": "1.0.48",
|
|
26
|
+
"@dalcode/dal-halo": "1.0.48"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-interactive",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Terminal-UI conveniences adopted from pi's example extensions: the questionnaire tool (the model asks you questions), /handoff (carry context into a new session) and interactive ! commands (vim, git rebase -i, htop). Active only in the TUI; stands down under DAL Code.",
|
|
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.48",
|
|
24
24
|
"typebox": "1.3.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-lang",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
-
"@dalcode/dal-bridge": "1.0.
|
|
20
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
21
|
+
"@dalcode/dal-bridge": "1.0.48"
|
|
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-learn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Self-evolution for DAL: lessons learned from earlier sessions (project and personal), a project map of verified commands and locations, effect tracking, and skill proposals for recurring procedures (/lessons).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
30
|
+
"@dalcode/dal-pi-kit": "1.0.48"
|
|
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-lsp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-bridge": "1.0.
|
|
25
|
-
"@dalcode/dal-dap": "1.0.
|
|
26
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
+
"@dalcode/dal-bridge": "1.0.48",
|
|
25
|
+
"@dalcode/dal-dap": "1.0.48",
|
|
26
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
27
27
|
"cross-spawn": "7.0.6",
|
|
28
28
|
"typebox": "1.3.7",
|
|
29
29
|
"typescript": "5.9.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
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-bridge": "1.0.
|
|
33
|
-
"@dalcode/dal-guard": "1.0.
|
|
34
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
35
|
-
"@dalcode/deepailab": "1.0.
|
|
36
|
-
"@earendil-works/pi-mcp": "1.0.
|
|
32
|
+
"@dalcode/dal-bridge": "1.0.48",
|
|
33
|
+
"@dalcode/dal-guard": "1.0.48",
|
|
34
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
35
|
+
"@dalcode/deepailab": "1.0.48",
|
|
36
|
+
"@earendil-works/pi-mcp": "1.0.48",
|
|
37
37
|
"cross-spawn": "7.0.6"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-office",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -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.48",
|
|
22
22
|
"docx": "9.7.1",
|
|
23
23
|
"echarts": "6.1.0",
|
|
24
24
|
"exceljs": "4.4.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
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.48",
|
|
24
|
+
"@dalcode/dal-skills": "1.0.48",
|
|
25
|
+
"@dalcode/deepailab": "1.0.48",
|
|
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.48",
|
|
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.48",
|
|
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.48",
|
|
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.48"
|
|
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.48",
|
|
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.48",
|
|
23
|
+
"@dalcode/dal-subagent": "1.0.48",
|
|
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.48",
|
|
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.48"
|
|
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.48",
|
|
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.48",
|
|
33
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
34
|
+
"@dalcode/dal-tool-catalog": "1.0.48",
|
|
35
|
+
"@dalcode/deepailab": "1.0.48",
|
|
36
|
+
"@earendil-works/pi-tui": "1.0.48"
|
|
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.48",
|
|
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.48"
|
|
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.48",
|
|
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.48",
|
|
26
|
+
"@dalcode/deepailab": "1.0.48",
|
|
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.48",
|
|
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.48"
|
|
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.48",
|
|
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.48",
|
|
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.48",
|
|
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.48",
|
|
22
|
+
"@dalcode/dal-guard": "1.0.48",
|
|
23
|
+
"@earendil-works/pi-agent-core": "1.0.48",
|
|
24
|
+
"@earendil-works/pi-ai": "1.0.48",
|
|
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.48",
|
|
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.48",
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.48",
|
|
26
|
+
"@dalcode/deepailab": "1.0.48"
|
|
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};
|