maka-agent 0.2.0-dev.35.20260915 → 0.2.0-dev.37.20260915

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 (43) hide show
  1. package/README.md +6 -0
  2. package/README.zh-CN.md +5 -0
  3. package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
  4. package/node_modules/@maka/core/dist/model-metadata.generated.js +175 -116
  5. package/node_modules/@maka/core/dist/models-dev-projection.js +1 -0
  6. package/node_modules/@maka/core/dist/provider-registry.js +17 -0
  7. package/node_modules/@maka/eval/dist/harbor-maka-subject.js +13 -3
  8. package/node_modules/@maka/eval/dist/maka-artifacts.js +28 -14
  9. package/node_modules/@maka/eval/dist/maka-subject.js +28 -3
  10. package/node_modules/@maka/eval/harbor/relay_agent.py +42 -2
  11. package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +0 -1
  12. package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +40 -53
  13. package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +26 -29
  14. package/node_modules/@maka/runtime/dist/builtin-tools.js +20 -12
  15. package/node_modules/@maka/runtime/dist/runtime-kernel.js +1 -0
  16. package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +144 -77
  17. package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +6 -19
  18. package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +24 -3
  19. package/node_modules/@maka/runtime-host/dist/client/connection.js +20 -2
  20. package/node_modules/@maka/runtime-host/dist/client/hosted-execution-target.js +27 -6
  21. package/node_modules/@maka/runtime-host/dist/client/hosted-execution.js +10 -28
  22. package/node_modules/@maka/runtime-host/dist/client/startup-error.js +1 -1
  23. package/node_modules/@maka/runtime-host/dist/execution-candidate-main.js +8 -1
  24. package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +1 -11
  25. package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +2 -2
  26. package/node_modules/@maka/runtime-host/dist/protocol/codec.js +11 -0
  27. package/node_modules/@maka/runtime-host/dist/protocol/index.js +1 -1
  28. package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +10 -2
  29. package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +65 -0
  30. package/node_modules/@maka/runtime-host/dist/server/execution-candidate.js +4 -1
  31. package/node_modules/@maka/runtime-host/dist/server/execution-composition-factory.js +9 -3
  32. package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +11 -0
  33. package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +3 -15
  34. package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +9 -4
  35. package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +1 -2
  36. package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +4 -1
  37. package/node_modules/@maka/storage/dist/agent-run-store-contract.js +11 -8
  38. package/node_modules/@maka/storage/dist/agent-run-store.js +1 -1
  39. package/node_modules/@maka/storage/dist/execution-stores.js +1 -1
  40. package/node_modules/@maka/storage/dist/message-admission-store.js +5 -3
  41. package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +14 -6
  42. package/package.json +1 -1
  43. package/node_modules/@maka/eval/dist/maka-runtime-policy.js +0 -42
@@ -113,6 +113,7 @@ export function buildBuiltinTools(options = {}) {
113
113
  buildManagedBashTool(options.shellRuns, {
114
114
  executionFacts,
115
115
  shell,
116
+ declareSandboxBoundary: options.declareSandboxBoundary !== false,
116
117
  ...(options.sandboxManager
117
118
  ? {
118
119
  transformCommand: ({ command, pty, requiredBoundary, ctx }) => {
@@ -143,6 +144,7 @@ export function buildBuiltinTools(options = {}) {
143
144
  buildExecutorBashTool(executor, shell, {
144
145
  ...(options.permissionProfile ? { permissionProfile: options.permissionProfile } : {}),
145
146
  ...(options.sandboxManager ? { sandboxManager: options.sandboxManager } : {}),
147
+ declareSandboxBoundary: options.declareSandboxBoundary !== false,
146
148
  sandboxPlatform,
147
149
  }),
148
150
  ];
@@ -451,22 +453,28 @@ function filesystemCall(ctx) {
451
453
  };
452
454
  }
453
455
  function buildExecutorBashTool(executor, shell, sandboxOptions) {
456
+ const declareSandboxBoundary = sandboxOptions.declareSandboxBoundary !== false;
457
+ const executorBashFields = {
458
+ command: z.string().describe('The shell command to execute'),
459
+ timeout_ms: z.number().int().positive().max(600_000).optional(),
460
+ };
454
461
  return {
455
462
  name: 'Bash',
456
463
  activityKind: 'command',
457
464
  description: withTurnShellGuidance('Run a shell command in the session cwd.', shell) +
458
- ' Enforced by the current session sandbox boundary.',
459
- parameters: preprocessBashBoundaryDeclaration(z
460
- .object({
461
- command: z.string().describe('The shell command to execute'),
462
- timeout_ms: z.number().int().positive().max(600_000).optional(),
463
- boundary_intent: bashBoundaryIntentSchema,
464
- required_boundary: sandboxBoundaryExpansionSchema
465
- .optional()
466
- .describe(BASH_REQUIRED_BOUNDARY_DESCRIPTION),
467
- })
468
- .strict()
469
- .superRefine(refineBashBoundaryDeclaration)),
465
+ (declareSandboxBoundary ? ' Enforced by the current session sandbox boundary.' : ''),
466
+ parameters: declareSandboxBoundary
467
+ ? preprocessBashBoundaryDeclaration(z
468
+ .object({
469
+ ...executorBashFields,
470
+ boundary_intent: bashBoundaryIntentSchema,
471
+ required_boundary: sandboxBoundaryExpansionSchema
472
+ .optional()
473
+ .describe(BASH_REQUIRED_BOUNDARY_DESCRIPTION),
474
+ })
475
+ .strict()
476
+ .superRefine(refineBashBoundaryDeclaration))
477
+ : z.object(executorBashFields).strict(),
470
478
  toModelOutput: ({ output }) => bashToolResultToModelOutput(output),
471
479
  executionFacts: executor.facts,
472
480
  impl: async (input, ctx) => {
@@ -316,6 +316,7 @@ export class RuntimeKernel {
316
316
  const run = new AgentRun({
317
317
  sessionId,
318
318
  header,
319
+ effectiveToolMode: await this.deps.resolveFreshTurnToolMode?.(header),
319
320
  userInput: input,
320
321
  runId: options.runId,
321
322
  userMessageId: options.userMessageId,