@@ -131,20 +131,24 @@ service's official documentation or an unambiguous local execution path proves t
131131field is consumed by an AI model. If that cannot be established, preserve existing tool behavior
132132and leave the field unannotated.
133133
134- - ** Ordinary provider/API input:** leave it unchanged. Do not add blanket result sanitization.
134+ - ** Ordinary provider/API input:** leave it unchanged. Explicit ` {{...}} ` references resolve and are
135+ sent with their normal request semantics. A URL, domain, resource ID, control field, or opaque
136+ payload is not model-visible merely because the provider is AI-backed or may process the
137+ referenced resource later.
135138- ** Text or structured content consumed by an AI model:** declare ` request.modelInput ` with
136139 ` mode: 'project' ` and select only the exact model-visible fields. The shared executor replaces
137140 activated Sim secrets with canonical ` {{NAME}} ` labels before request formatting. For nested or
138141 JSON-string fields, use a small shared selector plus ` applyProjected ` ; verify that selecting the
139142 rebuilt params reproduces the projected selection.
140- - ** Opaque model input sent directly to an external provider** such as a model-read URL or image
141- payload: declare ` request.opaqueModelInput ` with ` mode: 'reject-resolved-secrets' ` and select only
142- the exact effective value. The shared ` executeTool ` preflight rejects incomplete or secret-bearing
143- committed provenance before URL/body formatting or network I/O, preserves safe request bytes,
144- and sends no provenance metadata to the provider.
145- - ** Opaque model input owned by an authenticated internal route** such as uploaded audio, image,
146- video, file bytes, or signed URLs: add ` privateProvenance ` to a projected request, or use
147- ` mode: 'private-provenance' ` when there is no textual projection. The route must call
143+ - ** Serialized model content sent directly to an external provider:** include the serialized
144+ top-level param in ` request.modelInput ` . Project the private copy before the existing request
145+ formatter parses it; keep formatter behavior deterministic when a whole-value placeholder is not
146+ valid in the serialized grammar. Do not introduce a second hard-rejection path.
147+ - ** Opaque model input owned by an authenticated internal route** such as inline audio, image,
148+ video, or document bytes: add ` privateProvenance ` to a projected request, or use
149+ ` mode: 'private-provenance' ` when there is no textual projection. Do not select storage keys,
150+ paths, signed URLs, or ordinary remote URLs as byte provenance; the owning route must authorize
151+ stored bytes independently at model egress. The route must call
148152 ` validateOpaqueModelInputProvenance ` before downloading or sending content to the model and must
149153 apply the workspace-file provenance guard before reading a persisted workspace file.
150154- ** Sim-owned durable storage or internal execution handoff** that can later enter a workflow/model
@@ -160,9 +164,9 @@ Hard rules:
160164- Never substitute secret plaintext into source or serialize plaintext provenance.
161165- Never hand-roll private provenance headers/envelopes; the shared ` executeTool ` boundary owns
162166 transport and strips private metadata from functional results.
163- - Never attach private provenance to an external URL or to ` directExecution ` . Use the centralized
164- ` opaqueModelInput ` rejection mode for external/direct opaque model inputs, or an authenticated
165- internal route when encrypted provenance must cross the boundary.
167+ - Never attach private provenance to an external URL or to ` directExecution ` . Project proven
168+ model-visible external fields with ` request.modelInput ` ; otherwise preserve ordinary request
169+ semantics. Use an authenticated internal route when encrypted provenance must cross the boundary.
166170- Never sanitize arbitrary third-party tool results. Projection applies only to secrets activated
167171 by Sim's resolved-secret provenance for that execution/tool call.
168172- Do not add provenance merely because a value is persisted, returned by a tool, or appears in a
@@ -173,12 +177,11 @@ Hard rules:
173177 provider responses, filenames, URLs, and errors remain unchanged when Sim did not resolve a
174178 secret into them.
175179
176- Add focused tests covering named projection, ordinary identical text without provenance, nested
177- shape preservation, malformed/incomplete private metadata failing closed, centralized external
178- opaque rejection before formatting/I/O without byte changes or metadata transport, headerless
179- legacy requests, and absence of private metadata in the public tool result. For durable sinks, also
180- cover legacy ` NULL ` markers, exact-empty new writes, tracked secret writes, stale/missing sidecars,
181- and scope isolation.
180+ Add focused tests covering named projection, ordinary identical text without provenance, nested and
181+ serialized shape handling, unchanged ordinary external inputs, malformed/incomplete private metadata
182+ failing closed, headerless legacy requests, and absence of private metadata in the public tool result.
183+ For durable sinks, also cover legacy ` NULL ` markers, exact-empty new writes, tracked secret writes,
184+ stale/missing sidecars, and scope isolation.
182185
183186## Step 3: Create Block
184187
@@ -594,8 +597,8 @@ If creating V2 versions (API-aligned outputs):
594597- [ ] Registered all tools in ` tools/registry.ts `
595598- [ ] Ran ` bun run tool-metadata:generate ` and committed the regenerated artifacts
596599- [ ] Classified every model-visible, opaque, Sim-durable, and internal-execution request field
597- - [ ] Added shared model-input projection, centralized opaque rejection, or private provenance only
598- where required
600+ - [ ] Added shared model-input projection or private provenance only where required; ordinary
601+ external resource locators and control inputs retain their request semantics
599602- [ ] Confirmed ordinary third-party tool results are not generically sanitized
600603- [ ] Added provenance compatibility and fail-closed boundary tests where applicable
601604
0 commit comments