fix: detect arch from current environment in config add_agent #28
Merged
Conversation
The add_agent command did not call detect_arch() when creating a new agent, so arch fell back to the model default (x86_64) regardless of the host architecture. Call detect_arch() and pass it to BaseConfig to align with the init command path. Add unit tests for detect_arch() and for arch auto-detection in add_agent.
- Pass SessionCreateRequest object (not a pre-converted dict) to create_memory_session in MemorySession.__init__ and AsyncMemorySession._ensure_initialized, avoiding a double to_dict AttributeError since the data plane calls to_dict() internally. - Fix get_message argument order in both sessions to forward (message_id, space_id, session_id) matching the data plane signature; the previous (space_id, session_id, message_id) order scrambled space_id and message_id. - Add regression tests asserting call conventions for both sync and async sessions.
Add a storage_config block (sfs_turbo: {sfs_turbo_id, sfs_path,
mount_path, read_only}) to runtime creation, forwarded in the
create/update runtime API payload and surfaced in the YAML
generated by both `agentarts init` and `agentarts config`.
- config models: add SfsTurboConfig (sfs_turbo_id validated as UUID
via pattern) and StorageConfig; default to nested instances
(mirroring network_config/vpc_config) so config-generated YAML
includes the full block.
- init scaffold: include the storage_config/sfs_turbo example block.
- deploy: only enforce mount_path when sfs_turbo_id is set, so an
unset/all-null storage_config never blocks deploy; forward the
populated dict to create_or_update_agent.
- runtime_client: thread storage_config through create_agent,
update_agent, and create_or_update_agent (both create and update
branches).
- tests: model to_dict/UUID validation, init YAML block, config
add_agent block, deploy forwarding, no-block-when-unconfigured,
and required mount_path when id is set.
The V11 signer percent-encoded '/' in canonical query values (e.g. upload's `path`=/home/user/test.txt -> %2Fhome%2Fuser%2Ftest.txt), which mismatched the data-plane gateway's canonicalisation and caused IAM signature verification to fail for upload (while invoke, with no query params, succeeded). - signer_v11: encode query values with quote(safe="~/") so '/' is preserved. No-op for values without '/' (all other V11-signed requests), only affects '/'-bearing values like upload's `path`. - http_client/signer_v11: emit canonical_request / string_to_sign / Authorization / content-type via logger.debug, controlled by the SDK log level (AGENTARTS_LOG_LEVEL=DEBUG); no separate config. - tests: regression tests for canonical query (slash kept, sorted, simple values unchanged, list values, special chars still encoded).
Add an optional `swr_instance_id` (UUID format) field to ArtifactSourceConfig, surfaced in the YAML generated by both `agentarts init` and `agentarts config`. - config model: swr_instance_id with UUID pattern, default None. to_dict(exclude_none) includes it only when set, so it flows into the artifact_source payload automatically (no deploy change needed). - init scaffold: add `swr_instance_id: null` to the artifact_source block; config command picks it up via the model default. - tests: UUID validation, to_dict inclusion/exclusion, and both init/config generated YAML contain the field.
The CreateCoreRuntime API expects sfs_turbo as an Array of
CoreRunSfsTurboStorageConfig objects (up to 5 mount points). The SDK was
sending a single dict instead of a list, causing the mount config to be
rejected by the backend.
Fixes:
- StorageConfig.to_dict(): wraps sfs_turbo in a list [{...}] when
sfs_turbo_id is set; returns {} when unconfigured (was returning
{'sfs_turbo': {'read_only': False}} — not empty).
- SfsTurboConfig.read_only: default None (was False) so it's only sent
when explicitly set (exclude_none now excludes it).
- deploy: updated to handle the list format from to_dict().
- Tests: updated assertions to expect list format + None read_only.
Zhiyue-Wang
force-pushed
the
feature/runtime
branch
from
July 6, 2026 09:15
fd45eac to
3bb0a78
Compare
Some long-running commands (e.g. large file processing, ML inference) need more than 300s. Increase the max timeout for exec-command from 300s to 1000s in both the CLI layer and the operations layer.
…eout
The timeout parameter was only used as the HTTP client timeout, but
the backend needs it in the request body to enforce the command execution
deadline. Now:
- timeout is sent in the JSON body: {"command": [...], "timeout": N}
- HTTP client timeout is set to timeout + 60s to allow for network overhead
…ndpoint The control plane RuntimeClient used in _get_data_endpoint (for endpoint resolution) and _check_file_transfer_enabled was constructed without a timeout, defaulting to 30s. Users who set a large --timeout only had it applied to the data plane exec_command call, not the preceding control plane calls. If the control plane was slow, users saw a timeout (~10-30s) before the command even started executing. Fix: thread the user's timeout through _get_data_endpoint and _check_file_transfer_enabled to the control plane RuntimeClient. start_session/stop_session don't have a user-facing timeout param, so they keep the default 30s (appropriate for quick control plane calls).
…t_data_endpoint" This reverts commit 76dec01.
Zhiyue-Wang
force-pushed
the
feature/runtime
branch
from
July 7, 2026 12:26
daa8727 to
d1cd374
Compare
jsuwuj
pushed a commit
to jsuwuj/agentarts-sdk-python
that referenced
this pull request
Jul 17, 2026
fix: The network administrator name does not support capital letters …
jsuwuj
pushed a commit
to jsuwuj/agentarts-sdk-python
that referenced
this pull request
Jul 17, 2026
fix: detect arch from current environment in config add_agent
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.
No description provided.