[GH-ISSUE #1907] Document custom tool script contract divergence #924

Closed
opened 2026-10-21 05:23:37 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1907

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Legacy custom tools exposed a script execution type with a scriptBody contract. The refactor runtime intentionally disables script custom tools, but the parity boundary is not tracked publicly outside code comments/tests. This should be explicit so legacy imports, profile data, and future custom-tool UI work know whether script tools are unsupported by design or waiting for a safer replacement.

Static evidence:

  • Legacy packages/shared/src/schemas/custom-tool.schema.ts allowed executionType: "script" and persisted scriptBody.
  • Refactor src/engine/contracts/schemas/custom-tool.schema.ts only allows "webhook" | "static" and omits scriptBody from the create/update contract.
  • Refactor src/engine/contracts/types/agent.ts narrows CustomTool.executionType to "webhook" | "static".
  • Refactor src/features/catalog/agents/components/ToolEditor.tsx intentionally excludes script tools and treats existing executionType === "script" rows as unsupported.
  • Refactor src-tauri/src/commands/storage/custom_tools.rs reports scriptExecutionEnabled: false and returns custom_tool_script_unsupported with a convert-to-webhook-or-static migration hint when a legacy script tool is invoked.

Proposed behavior

Document the compatibility decision and expected handling for legacy script tools:

  • If script custom tools are intentionally retired, keep the refactor schema narrow and add user-facing import/profile guidance that script tools must be converted to webhook or static tools.
  • If script tools are meant to return later, keep script/scriptBody as a preserved-but-disabled contract shape and gate execution separately from storage/import/editing.

Expected owner or impact area

  • Catalog resources: agents or custom tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Refactor branch considerations

This does not need to restore script execution. The safer current behavior is defensible, but the compatibility contract should be explicit because legacy data can still contain executionType: "script" and scriptBody.

Related tracker: #1904, target 1 "Contracts and schemas".

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1907 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Legacy custom tools exposed a `script` execution type with a `scriptBody` contract. The refactor runtime intentionally disables script custom tools, but the parity boundary is not tracked publicly outside code comments/tests. This should be explicit so legacy imports, profile data, and future custom-tool UI work know whether script tools are unsupported by design or waiting for a safer replacement. Static evidence: - Legacy `packages/shared/src/schemas/custom-tool.schema.ts` allowed `executionType: "script"` and persisted `scriptBody`. - Refactor `src/engine/contracts/schemas/custom-tool.schema.ts` only allows `"webhook" | "static"` and omits `scriptBody` from the create/update contract. - Refactor `src/engine/contracts/types/agent.ts` narrows `CustomTool.executionType` to `"webhook" | "static"`. - Refactor `src/features/catalog/agents/components/ToolEditor.tsx` intentionally excludes script tools and treats existing `executionType === "script"` rows as unsupported. - Refactor `src-tauri/src/commands/storage/custom_tools.rs` reports `scriptExecutionEnabled: false` and returns `custom_tool_script_unsupported` with a convert-to-webhook-or-static migration hint when a legacy script tool is invoked. ## Proposed behavior Document the compatibility decision and expected handling for legacy script tools: - If script custom tools are intentionally retired, keep the refactor schema narrow and add user-facing import/profile guidance that script tools must be converted to webhook or static tools. - If script tools are meant to return later, keep `script`/`scriptBody` as a preserved-but-disabled contract shape and gate execution separately from storage/import/editing. ## Expected owner or impact area - [x] Catalog resources: agents or custom tools - [x] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [x] Docs, contributor workflow, or templates ## Refactor branch considerations This does not need to restore script execution. The safer current behavior is defensible, but the compatibility contract should be explicit because legacy data can still contain `executionType: "script"` and `scriptBody`. Related tracker: #1904, target 1 "Contracts and schemas". ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 2, 2026):

Resolved on refactor in a4ba3c90: REFACTOR_PARITY_PIPELINE now documents script custom tools as an unsupported compatibility boundary and points legacy data toward webhook/static conversion instead of local script execution. Verification passed: docs check plus the full code verification set.

<!-- gh-comment-id:4601637238 --> @SpicyMarinara commented on GitHub (Jun 2, 2026): Resolved on refactor in a4ba3c90: REFACTOR_PARITY_PIPELINE now documents script custom tools as an unsupported compatibility boundary and points legacy data toward webhook/static conversion instead of local script execution. Verification passed: docs check plus the full code verification set.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#924
No description provided.