maka-agent 0.2.0-dev.24.20260907 → 0.2.0-dev.25.20260908

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +38 -19
  2. package/README.zh-CN.md +34 -19
  3. package/dist/pi-transcript-tools.js +6 -0
  4. package/dist/pi-tui-layout.js +56 -10
  5. package/dist/pi-tui-pickers.js +102 -1
  6. package/dist/pi-tui-runner.js +156 -42
  7. package/dist/pi-tui-todo.js +221 -0
  8. package/dist/pi-tui-transcript-viewer.js +134 -7
  9. package/dist/runtime-host-cli-context.js +70 -13
  10. package/dist/runtime-host-handoff-surface.js +51 -26
  11. package/dist/runtime-host-local-handoff.js +11 -1
  12. package/dist/runtime-host-service-manager.js +0 -3
  13. package/dist/runtime-host-session-channel.js +13 -0
  14. package/dist/runtime-host-session-driver.js +42 -1
  15. package/dist/tui-copy-catalog.js +79 -3
  16. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  17. package/node_modules/@maka/core/dist/agent-run.js +1 -0
  18. package/node_modules/@maka/core/dist/attachments.js +3 -0
  19. package/node_modules/@maka/core/dist/canonical-json.js +27 -0
  20. package/node_modules/@maka/core/dist/capabilities.js +35 -0
  21. package/node_modules/@maka/core/dist/computer-use.js +0 -1
  22. package/node_modules/@maka/core/dist/display-redaction.js +18 -0
  23. package/node_modules/@maka/core/dist/llm-connections.js +13 -0
  24. package/node_modules/@maka/core/dist/model-call-attempt.js +2 -0
  25. package/node_modules/@maka/core/dist/model-metadata.js +4 -0
  26. package/node_modules/@maka/core/dist/redaction.js +35 -0
  27. package/node_modules/@maka/core/dist/run-composition.js +77 -2
  28. package/node_modules/@maka/core/dist/session.js +30 -4
  29. package/node_modules/@maka/core/dist/slash-command-catalog.js +1 -0
  30. package/node_modules/@maka/core/dist/tool-result-record-schema.js +2 -1
  31. package/node_modules/@maka/core/package.json +1 -0
  32. package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
  33. package/node_modules/@maka/runtime/dist/agent-run-inspect.js +0 -13
  34. package/node_modules/@maka/runtime/dist/agent-run.js +80 -1
  35. package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +16 -8
  36. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +57 -50
  37. package/node_modules/@maka/runtime/dist/archive-read-tool.js +2 -2
  38. package/node_modules/@maka/runtime/dist/context-budget-helpers.js +0 -16
  39. package/node_modules/@maka/runtime/dist/conversation-copy.js +153 -11
  40. package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +3 -3
  41. package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +69 -1
  42. package/node_modules/@maka/runtime/dist/mcp-tools.js +7 -2
  43. package/node_modules/@maka/runtime/dist/model-fetcher.js +42 -2
  44. package/node_modules/@maka/runtime/dist/model-history.js +0 -112
  45. package/node_modules/@maka/runtime/dist/plugin-runtime.js +20 -10
  46. package/node_modules/@maka/runtime/dist/plugin-tool-service.js +205 -0
  47. package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +8 -1
  48. package/node_modules/@maka/runtime/dist/request-shape.js +23 -0
  49. package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +1 -1
  50. package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +4 -0
  51. package/node_modules/@maka/runtime/dist/runtime-kernel.js +7 -0
  52. package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +21 -0
  53. package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -5
  54. package/node_modules/@maka/runtime/dist/test-connection.js +0 -1
  55. package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
  56. package/node_modules/@maka/runtime/dist/tool-availability.js +11 -1
  57. package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +63 -1
  58. package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +42 -12
  59. package/node_modules/@maka/runtime/dist/tool-result-archive.js +27 -4
  60. package/node_modules/@maka/runtime/package.json +1 -0
  61. package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +35 -12
  62. package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +2 -0
  63. package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +19 -0
  64. package/node_modules/@maka/runtime-host/dist/control/endpoint.js +1 -3
  65. package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
  66. package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +1 -3
  67. package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +0 -1
  68. package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +1 -1
  69. package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +1 -3
  70. package/node_modules/@maka/runtime-host/dist/protocol/index.js +5 -1
  71. package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
  72. package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +27 -5
  73. package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
  74. package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +31 -2
  75. package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
  76. package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +32 -32
  77. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +44 -9
  78. package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +42 -14
  79. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +47 -22
  80. package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +6 -0
  81. package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +6 -0
  82. package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +5 -2
  83. package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +4 -0
  84. package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +20 -2
  85. package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +13 -3
  86. package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +46 -0
  87. package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +0 -1
  88. package/node_modules/@maka/storage/dist/codex-session-adapter.js +284 -196
  89. package/node_modules/@maka/storage/dist/git-exec.js +61 -0
  90. package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
  91. package/node_modules/@maka/storage/dist/goal-authority.js +2 -2
  92. package/node_modules/@maka/storage/dist/interaction-store.js +2 -2
  93. package/node_modules/@maka/storage/dist/project-catalog.js +2 -23
  94. package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
  95. package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +8 -3
  96. package/node_modules/@maka/storage/dist/scheduled-task-store.js +249 -283
  97. package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
  98. package/node_modules/@maka/storage/dist/session-bundle-policy.js +2 -1
  99. package/node_modules/@maka/storage/dist/session-copy-cleanup.js +2 -1
  100. package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +1 -2
  101. package/node_modules/@maka/storage/dist/storage-id.js +28 -0
  102. package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +31 -4
  103. package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
  104. package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
  105. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+ import { WORKHUB_COORDINATION_SESSION_ID } from '@maka/core/session';
20
+ import { WorkHubActionEffectFailure } from './workhub-coordination-action-gate.js';
21
+ /** Preserve canonical ownership when a Coordination message is delegated. */
22
+ export async function copyWorkHubAttachmentsToTarget(store, artifacts, targetSessionId, attachments) {
23
+ const invalid = await artifacts.validateTurnAttachments(WORKHUB_COORDINATION_SESSION_ID, attachments);
24
+ if (invalid)
25
+ throw new WorkHubActionEffectFailure('operation_conflict', invalid);
26
+ const ids = attachments.map((attachment) => {
27
+ if (attachment.ref.kind !== 'session_file')
28
+ throw new Error('Invalid WorkHub attachment');
29
+ return attachment.ref.relativePath;
30
+ });
31
+ const copied = await store.copyConversationArtifacts({
32
+ sourceSessionId: WORKHUB_COORDINATION_SESSION_ID,
33
+ targetSessionId,
34
+ turnIds: [],
35
+ includeArtifactIds: ids,
36
+ });
37
+ return attachments.map((attachment, index) => {
38
+ const relativePath = copied.artifactIds.get(ids[index]);
39
+ if (!relativePath)
40
+ throw new WorkHubActionEffectFailure('operation_conflict', 'WorkHub attachment was not copied');
41
+ return {
42
+ ...attachment,
43
+ ref: { kind: 'session_file', sessionId: targetSessionId, relativePath },
44
+ };
45
+ });
46
+ }
@@ -306,7 +306,6 @@ function timestampMs(record) {
306
306
  }
307
307
  return undefined;
308
308
  }
309
- export default ClaudeCodeSessionAdapter;
310
309
  /* ------------------------------------------------------------------ *
311
310
  * Transcript -> StoredMessage[]
312
311
  * ------------------------------------------------------------------ */