Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/skills / / stampSkillTool
Function: stampSkillTool()
ts
function stampSkillTool<TInput, TOutput, TDeps>(tool, skill): StampedSkillTool<TInput, TOutput, TDeps>;Defined in: packages/skills/src/registry/bridge.ts:53
Stamp a skill-bundled tool with the metadata the @graphorin/tools registry expects:
- Derive a
ToolSourceof kind'skill'carrying the skill's name and trust level. - Run
resolveSandbox(...)so the resultingTool.sandboxPolicymatches the mandatory tier for untrusted skills (DEC-148). - Default the
inboundSanitizationpolicy to'detect-and-strip-and-wrap'for untrusted skills when the tool author left it unset; trusted skills inherit the operator's choice.
The function returns a freshly-frozen Tool with the resolved sandboxPolicy and inboundSanitization baked in so downstream registries cannot accidentally re-inherit a relaxed policy.
Type Parameters
| Type Parameter | Default type |
|---|---|
TInput | unknown |
TOutput | unknown |
TDeps | unknown |
Parameters
| Parameter | Type |
|---|---|
tool | Tool<TInput, TOutput, TDeps> |
skill | Pick<Skill, "metadata"> |
Returns
StampedSkillTool<TInput, TOutput, TDeps>