@orchestraai/agent-tools 0.8.2 → 0.10.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.
Files changed (40) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/.cursor-plugin/plugin.json +1 -1
  6. package/.devin/adapter.json +1 -1
  7. package/.hermes/adapter.json +1 -1
  8. package/.opencode/adapter.json +1 -1
  9. package/README.md +20 -0
  10. package/dist/bin.js +13 -1
  11. package/dist/bin.js.map +1 -1
  12. package/dist/claude-accounting.d.ts +75 -0
  13. package/dist/claude-accounting.js +155 -0
  14. package/dist/claude-accounting.js.map +1 -0
  15. package/dist/claude-native.d.ts +47 -0
  16. package/dist/claude-native.js +210 -0
  17. package/dist/claude-native.js.map +1 -0
  18. package/dist/claude-reconciliation.d.ts +28 -0
  19. package/dist/claude-reconciliation.js +112 -0
  20. package/dist/claude-reconciliation.js.map +1 -0
  21. package/dist/commands/claude-session.d.ts +30 -0
  22. package/dist/commands/claude-session.js +136 -0
  23. package/dist/commands/claude-session.js.map +1 -0
  24. package/dist/commands/claude-setup.d.ts +12 -0
  25. package/dist/commands/claude-setup.js +97 -0
  26. package/dist/commands/claude-setup.js.map +1 -0
  27. package/dist/commands/claude.d.ts +28 -0
  28. package/dist/commands/claude.js +129 -0
  29. package/dist/commands/claude.js.map +1 -0
  30. package/dist/commands/onboarding.js +66 -2
  31. package/dist/commands/onboarding.js.map +1 -1
  32. package/dist/index.js +6 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/internal/reporting-contracts.d.ts +2 -2
  35. package/dist/onboarding/init.d.ts +1 -1
  36. package/dist/onboarding/init.js +3 -1
  37. package/dist/onboarding/init.js.map +1 -1
  38. package/docs/claude-gateway.md +126 -0
  39. package/docs/release-checklist.md +6 -1
  40. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ # Claude Code through Orchestra
2
+
3
+ `orchestra claude` uses your saved Orchestra credential only in the Claude
4
+ child process. Install Claude Code and sign in with `orchestra login` first.
5
+ Run from a named Git branch with a GitHub `origin` remote.
6
+
7
+ ```sh
8
+ orchestra claude --org org_example --project example --workload coding \
9
+ --environment test -- --model <gateway-model-id>
10
+ ```
11
+
12
+ This sends Claude's model traffic, including prompts and tool results, to the
13
+ configured gateway. Repository name, branch, initial HEAD and session ID are
14
+ sent as attribution metadata. Capture and retention follow the selected
15
+ workload's configuration; this command does not enable capture or change it.
16
+ Gateway usage is billed separately from a Claude subscription.
17
+
18
+ The launcher prints its session ID and stores metadata privately under the
19
+ Orchestra home directory. It does not save the API key in that metadata.
20
+ Resume from the same worktree and branch:
21
+
22
+ ```sh
23
+ orchestra claude --resume <session-id> -- --model <gateway-model-id>
24
+ orchestra claude-session show <session-id>
25
+ ```
26
+
27
+ The original base commit and routing scope stay fixed across resume. A changed
28
+ branch, repository, organization, project, workload, environment or gateway
29
+ is rejected. Start a new session for another branch. Concurrent resumes,
30
+ background/cloud sessions, automatic worktrees and Claude's own session
31
+ switching flags are not supported.
32
+
33
+ The launcher disables user/project/local settings sources for this invocation
34
+ because settings can replace gateway credentials and attribution headers.
35
+ It leaves saved configuration untouched. Supply tool permissions and MCP
36
+ configuration explicitly when needed. Organization-managed settings still
37
+ apply; this is not a bypass of administrator policy. Claude Code 2.1.312 has been verified in headless and interactive terminal modes,
38
+ including Read/Edit and close/reopen resume. Other versions and background/cloud
39
+ launch modes need separate compatibility checks.
40
+
41
+ ## Account for a session without transcripts
42
+
43
+ ```sh
44
+ orchestra claude-session account <session-id>
45
+ ```
46
+
47
+ The launcher gives each new session a persistent W3C traceparent header. This
48
+ command reads the existing customer trace API, including failed requests and
49
+ background calls carrying that trace ID, and joins customer billing records. It
50
+ walks a frozen ingestion snapshot and checks every request against the session
51
+ trace, organization, project, workload and environment. Re-run after
52
+ ingestion/pricing catches up. No platform changes are required. Resuming a
53
+ session preserves its trace ID, so resumed invocations are accounted together.
54
+
55
+ The report separates priced cost from unpriced request IDs and uncaptured
56
+ request IDs. A total stays null if any request is unpriced or the inventory is
57
+ empty. Coverage warnings are preserved: requests without the session trace ID, early
58
+ rejections without a record, and later arrivals cannot be inferred from the
59
+ snapshot. Missing-ID and shared-ID ambiguity is unknown, never a fabricated zero.
60
+
61
+ With authenticated `gh`, the command discovers the unique PR for the branch,
62
+ checks repository/branch/base ancestry, and refreshes its merge status. Use
63
+ `--pr <number>` to select among multiple PRs. A missing or ambiguous linkage is
64
+ reported separately from request cost. Both source and merge commits are retained.
65
+
66
+ To verify stored request/response bodies as well, pass
67
+ `--out <private-directory> --include-payload --yes`. The metadata-only command
68
+ does not download payloads. Capture presence in the request log is an expectation,
69
+ not proof of successful download; capture verification records missing exports.
70
+
71
+ Sessions created before trace attribution remain resumable, but cannot use this
72
+ accounting path. Start a new session, or use transcript reconciliation below for
73
+ earlier sessions. Trace retention and gateway coverage limits still apply.
74
+
75
+ ## Reconcile a completed headless run
76
+
77
+ Keep stream output private: it contains prompts, tool results and completions.
78
+ Use a separate output file for each invocation, including resumes. The
79
+ transcripts and the capture export go under a private temporary directory
80
+ created with `mktemp -d`, which is readable only by you.
81
+
82
+ ```sh
83
+ umask 077
84
+ artifacts=$(mktemp -d)
85
+ orchestra claude --org org_example --project example --workload coding \
86
+ --environment test -- --model <gateway-model-id> --max-budget-usd 1 \
87
+ --output-format stream-json --verbose -p 'Describe this repository' \
88
+ > "$artifacts/initial.jsonl"
89
+ orchestra claude --resume <session-id> -- --model <gateway-model-id> \
90
+ --max-budget-usd 1 --output-format stream-json --verbose \
91
+ -p 'Summarize your previous answer' > "$artifacts/resumed.jsonl"
92
+ orchestra claude-session reconcile <session-id> \
93
+ --transcript "$artifacts/initial.jsonl" "$artifacts/resumed.jsonl" \
94
+ --out "$artifacts/captures" --include-payload --yes
95
+ ```
96
+
97
+ Reconciliation resolves assistant message IDs through the customer cost API,
98
+ requires complete pricing, compares token totals with the supplied transcripts,
99
+ and exports captures through the existing capture exporter. It verifies request
100
+ identity, environment, attribution tags and request/response body presence.
101
+ Output contains cost and verification metadata, never capture bodies. Retry
102
+ when ingestion or pricing is still pending. Duplicate results, mixed sessions,
103
+ missing payloads or token discrepancies fail reconciliation.
104
+
105
+ Coverage is the successful requests represented in the supplied completed
106
+ transcripts. This does not enumerate omitted invocations, failed requests or
107
+ background traffic. Compare a gateway session inventory before describing the
108
+ report as the cost of an entire session. Keep exports outside version control.
109
+
110
+ ## Link a pull request
111
+
112
+ With the GitHub CLI authenticated:
113
+
114
+ ```sh
115
+ orchestra claude-session link <session-id>
116
+ # Select explicitly if more than one PR matches the branch:
117
+ orchestra claude-session link <session-id> --pr 12
118
+ ```
119
+
120
+ The command verifies the PR head repository and branch against the session and
121
+ stores the head commit separately from the merge commit. Run it again after
122
+ merge to refresh the linkage. It reads GitHub only; it does not create, review
123
+ or merge a PR. This is explicit branch attribution, not proof that Claude
124
+ produced every change, that every session was included, or that the PR belongs
125
+ to only one session. PR and reconciliation records remain separate private
126
+ artifacts keyed by session ID.
@@ -41,10 +41,15 @@ Before publishing a package, run:
41
41
  npm run package:smoke -- --release
42
42
  ```
43
43
 
44
- It runs `npm pack --dry-run --json` and inspects the included files for local
44
+ It runs `npm pack --dry-run --json` and inspects Orchestra-owned files for local
45
45
  artifacts, private paths, raw payload markers, production/control-plane URLs,
46
46
  and secret-shaped strings.
47
47
 
48
+ Bundled public dependencies are checked against npm registry integrity entries in
49
+ `package-lock.json` and their installed names/versions. Run `npm ci` before this
50
+ check: npm verifies the downloaded archives. Upstream examples and localized
51
+ strings are outside Orchestra's private-term policy; unpinned dependencies fail.
52
+
48
53
  ## Desktop release
49
54
 
50
55
  Understudy Desktop is deprecated and no longer released from this repository.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestraai/agent-tools",
3
- "version": "0.8.2",
3
+ "version": "0.10.0",
4
4
  "description": "Orchestra agent tools: the orchestra CLI and coding-agent skill library.",
5
5
  "repository": {
6
6
  "type": "git",