teamclaws 2.0.26 → 2.0.27

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
@@ -94,7 +94,7 @@ shared workflow for login, alias-based user-selected pairing (including a single
94
94
  workspace), additional pairings, project transfer, and optional public/private
95
95
  live hosting. Login and pairing mechanics remain in their respective skills;
96
96
  [teamclaws-project](skills/teamclaws-project/SKILL.md) covers project work through
97
- the existing paired shell. Status-only requests do not start onboarding.
97
+ the existing workspace shell. Status-only requests do not start onboarding.
98
98
 
99
99
  Before any browser authorization, the agent explains the process: sign this
100
100
  computer's CLI into the user's TeamClaws account through the browser, choose a
@@ -588,4 +588,4 @@ repeat the remote mutation. Existing login and pairing credentials are unchanged
588
588
 
589
589
  ## Shared project lifecycle
590
590
 
591
- Use `teamclaws projects list|create|rename|delete|hide|show <target>` to manage saved projects and host directories through the paired API. Projects are shared by default; hiding is personal. Mutations require `--request-id <uuid>`. Deletion keeps files unless `--delete-directory` is explicitly supplied, and always preserves conversations. Superusers cannot delete owner-created projects through these operations. See the [project lifecycle contract](skills/teamclaws-project/references/project-lifecycle.md) for complete arguments, permissions, receipts and recovery.
591
+ Use `teamclaws projects list|create|rename|delete|hide|show <target>` to manage saved projects and host directories with account login, without requiring a saved device pairing. Existing paired connections keep their authentication path. Projects are shared by default; hiding is personal. Mutations require `--request-id <uuid>`. Deletion keeps files unless `--delete-directory` is explicitly supplied, and always preserves conversations. Superusers cannot delete owner-created projects through these operations. See the [project lifecycle contract](skills/teamclaws-project/references/project-lifecycle.md) for complete arguments, permissions, receipts and recovery.
package/dist/app.js CHANGED
@@ -157,7 +157,7 @@ export async function run(arguments_, dependencies = {}, signal) {
157
157
  await targetAuthorization.requireGrant();
158
158
  switch (parsed.action) {
159
159
  case "projects": {
160
- const result = await runProjects(store, dependencies.fetcher ?? fetch, parsePairingTarget(parsed.target), parsed.projectRequest, targetAuthorization, signal);
160
+ const result = await runProjects(store, dependencies.fetcher ?? fetch, parsePairingTarget(parsed.target), parsed.projectRequest, targetAuthorization, broker, signal);
161
161
  stdout.write(`${JSON.stringify(result, null, parsed.json ? undefined : 2)}\n`);
162
162
  return result.ok === true ? 0 : 1;
163
163
  }
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PACKAGE_NAME = "teamclaws";
2
- export const PACKAGE_VERSION = "2.0.26";
2
+ export const PACKAGE_VERSION = "2.0.27";
3
3
  export const CLIENT_NAME = "teamclaws-cli";
4
4
  export const CONTRACT_VERSION = 1;
5
5
  export const OUTPUT_SCHEMA_VERSION = 1;
package/dist/projects.js CHANGED
@@ -1,18 +1,40 @@
1
1
  import { TeamClawsError } from "./errors.js";
2
- import { errorFromResponse } from "./http.js";
2
+ import { errorFromResponse, requestJson } from "./http.js";
3
3
  import { requestTargetJson, } from "./target-authorization.js";
4
4
  import { isObject } from "./validation.js";
5
- export async function runProjects(store, fetcher, target, data, authorization, signal) {
5
+ export async function runProjects(store, fetcher, target, data, authorization, broker, signal) {
6
6
  const credential = await store.findWorkspace(target);
7
- if (!credential)
8
- throw new TeamClawsError("re_pair_required", "No saved pairing was found for this workspace. Pair it first.", { exitCode: 3 });
7
+ let accountServer;
8
+ if (!credential) {
9
+ const inventory = await broker.servers(signal);
10
+ const matches = inventory.servers.filter((server) => "server_id" in target
11
+ ? server.server_id === target.server_id
12
+ : new URL(server.workspace_url).origin ===
13
+ new URL(target.workspace_url).origin);
14
+ if (matches.length !== 1)
15
+ throw new TeamClawsError("target_unavailable", "The selected workspace is not available to this TeamClaws account.", { exitCode: 3 });
16
+ accountServer = matches[0];
17
+ }
9
18
  let response;
10
19
  try {
11
- response = await requestTargetJson(fetcher, authorization, `${credential.origin}/teamclaws-admin/api/projects/`, credential, {
12
- method: data.action === "list" ? "GET" : "POST",
13
- ...(data.action === "list" ? {} : { body: data }),
14
- ...(signal ? { signal } : {}),
15
- });
20
+ if (credential) {
21
+ response = await requestTargetJson(fetcher, authorization, `${credential.origin}/teamclaws-admin/api/projects/`, credential, {
22
+ method: data.action === "list" ? "GET" : "POST",
23
+ ...(data.action === "list" ? {} : { body: data }),
24
+ ...(signal ? { signal } : {}),
25
+ });
26
+ }
27
+ else {
28
+ const server = accountServer;
29
+ const url = `${new URL(server.workspace_url).origin}/teamclaws-admin/api/projects/`;
30
+ const method = data.action === "list" ? "GET" : "POST";
31
+ response = await requestJson(fetcher, url, {
32
+ method,
33
+ headers: await authorization.headersForAccountShell(method, url, server, signal),
34
+ ...(data.action === "list" ? {} : { body: data }),
35
+ ...(signal ? { signal } : {}),
36
+ });
37
+ }
16
38
  }
17
39
  catch (error) {
18
40
  if (data.action === "list")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamclaws",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "description": "Move, share and manage AI agent projects in a TeamClaws cloud workspace. CLI, MCP and agent skills for Claude, ChatGPT, Cursor, Grok and more.",
5
5
  "keywords": [
6
6
  "teamclaws",
@@ -90,9 +90,11 @@ of browser approval. After `login_complete` and exit 0, confirm the account and
90
90
  immediately continue to workspace discovery. Denial, expiry, and network failure
91
91
  are distinct failures; report the actual result without claiming success.
92
92
 
93
- For a shell-only request, discover the selected workspace and run the authorized
94
- `teamclaws shell` command after login. A saved device pairing is not required;
95
- do not start the pairing journey for that request.
93
+ For project or file work using the workspace shell, or saved-project lifecycle
94
+ requests, discover the selected workspace and run the authorized `teamclaws shell`
95
+ or `teamclaws projects` command after login. A saved device pairing is not
96
+ required; do not start the pairing journey for that work. Existing project
97
+ permissions and request receipts apply.
96
98
 
97
99
  ## Choose workspaces
98
100
 
@@ -14,10 +14,11 @@ account's permissions and the machine's resources, it can hold complete projects
14
14
  and execute their workloads. The official CLI can launch commands through the
15
15
  workspace shell, place authorized files on the machine, inspect results, and help
16
16
  set up applications and services. A linked AI provider is not required for shell
17
- work. Shell-only commands can use account login without a saved device pairing;
18
- the CLI checks account access and binds each shell proof to this computer.
17
+ work. Shell and saved-project lifecycle commands can use account login without a
18
+ saved device pairing; the CLI checks account access and binds each request to
19
+ this computer. Existing project permissions and request receipts apply.
19
20
  There is no dedicated `teamclaws deploy` or file-transfer command; use the
20
- paired shell and the project skill's supported transfer and hosting procedures.
21
+ workspace shell and the project skill's supported transfer and hosting procedures.
21
22
 
22
23
  Think of it as a workshop the user and their agents can reach from different
23
24
  places. A user who prefers concrete examples may find "a computer that can keep
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: teamclaws-project
3
- description: Find and retrieve authorized files from a paired TeamClaws workspace, or put files, jobs, agents, and projects there and run them.
3
+ description: Find and retrieve authorized files from an authorized TeamClaws workspace, or put files, jobs, agents, and projects there and run them.
4
4
  ---
5
5
 
6
6
  # Put work on a TeamClaws server
7
7
 
8
8
  Use the conversation sequence in [teamclaws-onboard](../teamclaws-onboard/SKILL.md).
9
- Ask for the project if missing and the paired destination if ambiguous. Inspect
9
+ Ask for the project if missing and the destination workspace if ambiguous. Inspect
10
10
  its files and instructions before asking for configuration already present.
11
11
  Preserve the source unless the user explicitly requests deletion. Do not copy
12
12
  provider credentials, CLI login files, device credentials, or unrelated secrets.
@@ -18,7 +18,7 @@ For ideas and the requirements behind them, read the onboarding skill's
18
18
  already named the job, files, agent, or project and asked you to run or deploy it,
19
19
  carry that task through instead of restarting a generic onboarding conversation.
20
20
  Inspect the destination's instructions, available runtimes, resources, network
21
- access, and account permissions through the paired shell before choosing a setup.
21
+ access, and account permissions through the workspace shell before choosing a setup.
22
22
 
23
23
  Pairing connects this computer to the workspace. It does not add a person as a
24
24
  workspace user; user membership is a separate privilege.
@@ -40,10 +40,11 @@ and verification. Projects are visible workspace-wide by default; hiding is pers
40
40
  A non-owner superuser cannot delete an owner-created project through this functionality.
41
41
  These commands do not change unrelated shell or filesystem access.
42
42
 
43
- For shell-only administration, a valid CLI account login can authorize
44
- `teamclaws shell` without a saved device pairing. Do not start pairing merely
45
- to run that command. The project lifecycle and transfer instructions below
46
- retain their own prerequisites.
43
+ A valid CLI account login can authorize `teamclaws shell` and the dedicated
44
+ `teamclaws projects` lifecycle commands without a saved device pairing. Do not
45
+ start pairing merely to run those commands. Project permissions and request
46
+ receipts remain unchanged. File transfer uses that same workspace shell and
47
+ does not require a saved device pairing.
47
48
 
48
49
  ## Jobs, services, and external systems
49
50
 
@@ -71,10 +72,11 @@ Only claim a CLI-to-browser handoff for the same conversation when supported and
71
72
  verified. Sharing access requires the user's intended recipients and permissions
72
73
  and the workspace's supported sharing controls.
73
74
 
74
- ## Transfer through the existing paired shell
75
+ ## Transfer through the existing workspace shell
75
76
 
76
- Prerequisites: valid TeamClaws CLI login, verified pairing to the selected stable
77
- server identifier, and user authorization for the selected project/data. Use:
77
+ Prerequisites: valid TeamClaws CLI login, access to the selected stable server
78
+ identifier, and user authorization for the selected project/data. A saved device
79
+ pairing is optional; existing paired connections retain their authentication path. Use:
78
80
 
79
81
  ```text
80
82
  teamclaws shell <server-id> --command <one-quoted-command-argument> --json
@@ -94,7 +96,7 @@ Default shared documents, reports, findings, and transfers to the provisioned
94
96
  `handoffs` directory unless the user names another destination. Keep projects in
95
97
  their selected directories; do not change the general working directory or move them.
96
98
 
97
- Discover the exact shared path through the existing paired shell:
99
+ Discover the exact shared path through the existing workspace shell:
98
100
 
99
101
  ```text
100
102
  teamclaws shell <server-id> --command 'printf "%s\n" "$TEAMCLAWS_HANDOFFS_DIR"' --json
@@ -130,12 +132,12 @@ for a full path:
130
132
  and `/var/tmp/`. These are temporary locations, not durable storage.
131
133
  - The shared workspace, commonly `/home/teamclaws_user/`, including documented
132
134
  project, artifact, or handoff directories in `LOCAL_AGENT.md` or project instructions.
133
- - The paired user's `$HOME` and its `workspace/` directory. This private home
135
+ - The execution user's `$HOME` and its `workspace/` directory. This private home
134
136
  can differ from the shared workspace and from another agent's home.
135
137
 
136
138
  These are likely locations, not a guarantee that every directory exists or is
137
139
  shared with every identity. Inspect the actual paths and permissions. A
138
- provider's private temporary namespace may differ from the paired shell's `/tmp`.
140
+ provider's private temporary namespace may differ from the workspace shell's `/tmp`.
139
141
  Do not change permissions or switch identities to search inaccessible locations.
140
142
 
141
143
  Search the named directory and its children for the exact filename first;
@@ -151,7 +153,7 @@ directory symlinks explicitly without following them outside the authorized scop
151
153
 
152
154
  If the file is still unfound, report the actual searched locations and access
153
155
  failures before asking for its full path or originating chat/project. To retrieve
154
- a found non-secret file, return its bytes through the paired shell (base64 is
156
+ a found non-secret file, return its bytes through the workspace shell (base64 is
155
157
  suitable), save them locally, and compare the remote and saved SHA-256 hashes.
156
158
  Preserve the remote original and do not print encoded file contents unnecessarily.
157
159
 
@@ -214,7 +216,7 @@ permission to access it. It is not open to the general public.”
214
216
 
215
217
  Both choices run live on TeamClaws. Carry out the user's selection using the
216
218
  workspace's supported hosting mechanisms. Read its machine instructions and
217
- runtime capability manifest through the paired shell, then follow its assigned
219
+ runtime capability manifest through the workspace shell, then follow its assigned
218
220
  hosting skill if present. Do not assume an assigned skill exists on every host.
219
221
 
220
222
  Use a separate application directory, service, data store, and configuration.
@@ -1,6 +1,6 @@
1
1
  # Project lifecycle commands
2
2
 
3
- Prerequisites: installed matching CLI/server releases, valid account sign-in, verified pairing to the selected workspace, and the user's instruction for the operation. Use a stable workspace ID as `<target>`.
3
+ Prerequisites: installed matching CLI/server releases, valid account sign-in, and the user's instruction for the operation. A saved device pairing is optional; existing pairings retain their authentication path. Use a stable workspace ID as `<target>`.
4
4
 
5
5
  ```text
6
6
  teamclaws projects list <target> --json
@@ -24,4 +24,4 @@ Deletion normally removes only the saved project entry and detaches its chat ref
24
24
 
25
25
  Require exit code zero and `ok=true`; inspect returned project ID/name/path and directory/record outcome fields. List again for current state: a request retry returns the original receipt, not fresh state. `record_deleted=true` does not mean files were deleted. `directory_exists=true` is expected after record-only removal. Report `partial_failure` and its exact saved/host outcomes accurately and resolve them before claiming completion.
26
26
 
27
- `outcome_unverified` is not success. Retry only the exact request with its original UUID. Missing pairing requires the normal pairing flow; owner-protected, authorization-denied, unsupported-server, and path-collision responses do not authorize credential or database fallbacks. These dedicated operations authenticate through the existing paired target authorization and invoke `/teamclaws-admin/api/projects/`; credentials stay in the CLI's existing storage and request pipeline.
27
+ `outcome_unverified` is not success. Retry only the exact request with its original UUID. Without a saved pairing, the CLI resolves the selected workspace through the account inventory and uses the existing account-shell proof with machine-bound DPoP. Do not start pairing merely for a project operation; owner-protected, authorization-denied, unsupported-server, and path-collision responses do not authorize credential or database fallbacks. These dedicated operations invoke the existing `GET`/`POST /teamclaws-admin/api/projects/` endpoint. This endpoint accepts the existing `workspace:shell` account authority for project lifecycle operations only, with fresh grant, machine, workspace entitlement and roster checks. It does not add account-shell authentication to any other API. The server derives the actor from authentication and applies unchanged project, path, owner and sudo policy. Credentials stay in the CLI's existing storage and request pipeline; no device credential or pairing is fabricated or saved.