Draft
Conversation
…ntrol-integration
…ntrol-integration
…ntrol-integration
…ntrol-integration
…r gateway token The message tool and other gateway-dependent tools called from the sandbox fail with 'pairing required' because resolveGatewayOptions() only reads the explicit gatewayToken param and never falls back to OPENCLAW_GATEWAY_TOKEN env var or gateway.auth.token from config. This mirrors the fallback chain in callGateway (src/gateway/call.ts): explicit param → OPENCLAW_GATEWAY_TOKEN → CLAWDBOT_GATEWAY_TOKEN → config Fixes openclaw#21478
…iring check operatorScopeSatisfied() only treated operator.admin as a superset of operator.read, but not operator.write, operator.approvals, or operator.pairing. This caused agent tool calls (e.g. message send) to fail with 'pairing required' because the tool requests operator.write scope, and the already-paired device only had operator.admin — which should be sufficient. This was inconsistent with authorizeOperatorScopesForMethod() in method-scopes.ts, which correctly treats operator.admin as god-mode. Fixes the 'gateway closed (1008): pairing required' error when the agent sandbox tries to send messages via the gateway.
# Conflicts: # src/agents/pi-embedded-runner/run/attempt.test.ts # src/agents/pi-embedded-runner/run/attempt.ts
lan17
added a commit
to agentcontrol/agent-control
that referenced
this pull request
Feb 23, 2026
Tested in OpenClaw integration PR: lan17/openclaw#1 ## Summary This PR delivers the TypeScript SDK in this repo from scaffold to production-ready client, then layers deterministic client-surface naming improvements on top. ## What’s Included - Added and wired `sdks/typescript/` package structure, build/test/lint/typecheck flow, and npm publish workflow. - Added Speakeasy generation against committed `server/openapi.json` with committed generated SDK sources. - Wired `AgentControlClient` to generated Speakeasy runtime and exposed endpoint namespaces (`agents`, `controls`, `evaluation`, `evaluatorConfigs`, `evaluators`, `observability`, `policies`, `system`). - Added client wiring tests (URL/query/body/auth headers and pre-init guard behavior). - Added monorepo TypeScript example app (`examples/typescript_sdk`) that demonstrates consuming `agent-control` via npm-compatible setup. ## Deterministic Method Naming (follow-up in this PR) - Replaced ad-hoc method overrides with a deterministic rule-generated overlay. - Added generator: `sdks/typescript/scripts/generate-method-names-overlay.py`. - Updated generation flow so `generate-sdk.sh` regenerates `overlays/method-names.overlay.yaml` from OpenAPI before `speakeasy overlay apply --strict`. - Added semantic exception for clarity: - `PATCH /api/v1/controls/{control_id}` -> `controls.updateMetadata` - `PUT /api/v1/controls/{control_id}/data` -> `controls.updateData` - Updated SDK/docs/tests/examples to the shorter method surface (`list`, `get`, `create`, `update*`, `delete`, `evaluate`, etc.). ## Guardrails and CI - Added `make sdk-ts-name-check` heuristic for verbose fallback names. - Added Python unit tests for naming generator: `sdks/typescript/tests/test_generate_method_names_overlay.py`. - Added `make sdk-ts-overlay-test` and wired it into CI. - Tightened `generate-check` to verify both generated SDK code and overlay drift: - `src/generated` - `overlays/method-names.overlay.yaml` ## Validation - `make sdk-ts-overlay-test` - `make sdk-ts-name-check` - `make sdk-ts-lint` - `make sdk-ts-typecheck` - `make sdk-ts-test` - `make sdk-ts-build` - `make sdk-ts-generate-check` ## Notes - TypeScript SDK package version moved to `0.2.0` due to method-surface changes. - `sdk-ts-ci` includes naming generator tests and generated/overlay drift checks.
…olved # Conflicts: # src/agents/pi-embedded-runner/run/attempt.test.ts
…w into lan17/after_tools_resolved
…egration # Conflicts: # src/agents/pi-embedded-runner/run/attempt.e2e.test.ts # src/agents/pi-embedded-runner/run/attempt.ts # src/agents/tools/gateway.ts # src/shared/operator-scope-compat.test.ts # src/shared/operator-scope-compat.ts
…w into lev/agent-control-integration # Conflicts: # src/agents/pi-embedded-runner/run/attempt.test.ts # src/agents/pi-embedded-runner/run/attempt.ts
lan17
pushed a commit
that referenced
this pull request
Mar 2, 2026
… and docs (openclaw#16761) Add inline file attachment support for sessions_spawn (subagent runtime only): - Schema: attachments[] (name, content, encoding, mimeType) and attachAs.mountPath hint - Materialization: files written to .openclaw/attachments/<uuid>/ with manifest.json - Validation: strict base64 decode, filename checks, size limits, duplicate detection - Transcript redaction: sanitizeToolCallInputs redacts attachment content from persisted transcripts - Lifecycle cleanup: safeRemoveAttachmentsDir with symlink-safe path containment check - Config: tools.sessions_spawn.attachments (enabled, maxFiles, maxFileBytes, maxTotalBytes, retainOnSessionKeep) - Registry: attachmentsDir/attachmentsRootDir/retainAttachmentsOnKeep on SubagentRunRecord - ACP rejection: attachments rejected for runtime=acp with clear error message - Docs: updated tools/index.md, concepts/session-tool.md, configuration-reference.md - Tests: 85 new/updated tests across 5 test files Fixes: - Guard fs.rm in materialization catch block with try/catch (review concern #1) - Remove unreachable fallback in safeRemoveAttachmentsDir (review concern openclaw#7) - Move attachment cleanup out of retry path to avoid timing issues with announce loop Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM> Co-authored-by: napetrov <napetrov@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.Security Impact (required)
Yes/No)Yes/No)Yes/No)Yes/No)Yes/No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Yes/No)Yes/No)Yes/No)Failure Recovery (if this breaks)
Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.