@sylphx/sdk 0.26.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,6 +10,12 @@ First-class **external** TypeScript client for Sylphx Platform.
10
10
  **Wire authority:** Protobuf under `api/proto/sylphx/platform/v1/` (sole).
11
11
  Not Effect Schema / `@sylphx/contract`.
12
12
 
13
+ SDK namespaces and command groups are generated or observed projections. They do
14
+ not create Platform primitives, semantic families, lifecycle authorities, or
15
+ compatibility promises. The target ontology is the four primitives `Resource`,
16
+ `Operation`, `Event`, and `Artifact`, with the seven semantic capability
17
+ families declared by the Platform Constitution.
18
+
13
19
  ## Install
14
20
 
15
21
  ```bash
@@ -50,17 +56,49 @@ const deps = await mgmt.listDeployments('prj_…')
50
56
  await mgmt.api('GET', '/projects')
51
57
  ```
52
58
 
59
+ ## Agent Computer contract projection
60
+
61
+ Agent Computer payloads, HTTP/SSE bindings, validators, and immutable contract
62
+ identity are generated from the management-rooted Protobuf descriptor graph.
63
+ These exports are the typed wire boundary; they do not imply that a live Agent
64
+ Computer runtime is deployed.
65
+
66
+ The contract is lifecycle-based: a caller must authenticate a `ComputerLease`,
67
+ wait for a provider-backed `READY` result, and use the returned evidence for
68
+ observe/act/postcondition decisions. Unsupported or not-yet-proven profiles
69
+ remain typed refusals or non-ready states; the SDK never treats a stale or
70
+ synthetic readiness value as a live computer.
71
+
72
+ ```ts
73
+ import {
74
+ AGENT_COMPUTER_BINDINGS,
75
+ AGENT_COMPUTER_CONTRACT_IDENTITY_SHA256,
76
+ AGENT_COMPUTER_CONTRACT_REVISION,
77
+ validateAgentComputerRequest,
78
+ validateAgentComputerResponse,
79
+ } from '@sylphx/sdk'
80
+
81
+ const request = validateAgentComputerRequest('getComputerProfile', {
82
+ profileId: 'profile_…',
83
+ })
84
+ ```
85
+
53
86
  ## Contract identity
54
87
 
55
88
  ```ts
56
- import { WIRE_CONTRACT_PACKAGE, WIRE_CONTRACT_REVISION } from '@sylphx/sdk'
57
- // sylphx.platform.v1 @ 0.3.0 — same as Rust sylphx-wire
89
+ import { API_TYPES_CONTRACT_PACKAGE, API_TYPES_CONTRACT_REVISION } from '@sylphx/sdk'
90
+ // sylphx.platform.v1 @ 0.5.0 — same generated identity as Rust sylphx-api-types
58
91
  ```
59
92
 
60
93
  ## CLI
61
94
 
62
- Operator CLI remains **Rust** binary `sylphx` (`sylphx-cli` on crates.io).
63
- TS `@sylphx/cli` is not the product path.
95
+ Operator CLI is the **Rust** binary `sylphx` (crate `sylphx-cli`). Install via
96
+ either channel — same binary product:
97
+
98
+ ```bash
99
+ npm install -g @sylphx/cli # npm channel (native binary optionalDeps)
100
+ cargo install sylphx-cli # crates.io channel
101
+ ```
64
102
 
65
103
  ## Install (commercial)
66
104
 
@@ -71,8 +109,19 @@ npm install @sylphx/sdk
71
109
  # Rust libraries
72
110
  # Cargo.toml: sylphx-sdk = "0.1", sylphx-sdk-management = "0.1"
73
111
 
74
- # Operator CLI (Rust only — not npm @sylphx/cli)
75
- cargo install sylphx-cli
112
+ # Operator CLI (Rust binary — npm or cargo)
113
+ npm install -g @sylphx/cli
114
+ # or: cargo install sylphx-cli
76
115
  ```
77
116
 
78
- **Not product:** `npm install @sylphx/cli` (retired TypeScript CLI).
117
+ ## Batch Jobs (Workload Fabric)
118
+
119
+ The current observed SDK surface uses `WorkClient` → `POST /v1/work/container`.
120
+ That namespace and path are projections, not target authority. The constitutional
121
+ target is a typed `BatchJob` Work Resource whose create, cancellation, retry,
122
+ repair, and terminal truth use the common `Operation` contract.
123
+
124
+ Legacy `RunsClient.run`, `runDistributed`, and compatibility-only worker/task
125
+ re-exports are predecessor surfaces. They are not final target contracts and
126
+ must be deleted rather than retained as throwing aliases.
127
+