archal 0.9.20 → 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 (90) hide show
  1. package/README.md +59 -159
  2. package/agents/openclaw/Dockerfile +2 -1
  3. package/agents/openclaw/README.md +10 -17
  4. package/agents/openclaw/drive.mjs +21 -31
  5. package/agents/openclaw/extract-openclaw-response-text.mjs +49 -0
  6. package/agents/openclaw/scenarios/acceptance/github-escalation-and-cleanup.md +43 -0
  7. package/agents/openclaw/scenarios/acceptance/jira-linear-release-triage.md +39 -0
  8. package/agents/openclaw/scenarios/acceptance/multi-clone-customer-risk-review.md +45 -0
  9. package/agents/openclaw/scenarios/acceptance/slack-incident-handoff.md +42 -0
  10. package/agents/openclaw/scenarios/acceptance/stripe-dunning-remediation.md +40 -0
  11. package/agents/openclaw/scenarios/close-stale-issues.md +35 -0
  12. package/agents/openclaw/workspace/TOOLS.md +19 -0
  13. package/clone-assets/calcom/tools.json +1705 -153
  14. package/clone-assets/clickup/tools.json +2528 -541
  15. package/clone-assets/customerio/tools.json +2108 -144
  16. package/clone-assets/github/tools.json +1 -2
  17. package/clone-assets/gitlab/tools.json +10087 -398
  18. package/clone-assets/hubspot/tools.json +198 -0
  19. package/clone-assets/linear/tools.json +41 -1
  20. package/clone-assets/sentry/tools.json +2264 -188
  21. package/clone-assets/stripe/tools.json +114 -0
  22. package/clone-assets/webflow/tools.json +1895 -125
  23. package/dist/{autoloop-worker-types-BEb_E44z.d.cts → autoloop-worker-types-CHaclqtD.d.cts} +23 -59
  24. package/dist/cli.cjs +107175 -126959
  25. package/dist/commands/{autoloop-hosted-worker.cjs → autoloop-hosted-control-plane-client.cjs} +25657 -42736
  26. package/dist/commands/{autoloop-hosted-worker.d.cts → autoloop-hosted-control-plane-client.d.cts} +32 -42
  27. package/dist/commands/autoloop-pr-verification.cjs +607 -522
  28. package/dist/commands/autoloop-pr-verification.d.cts +3 -1
  29. package/dist/commands/autoloop-result-parser.cjs +2474 -2373
  30. package/dist/commands/autoloop-result-parser.d.cts +159 -2
  31. package/dist/commands/autoloop-worker.cjs +14565 -12240
  32. package/dist/commands/autoloop-worker.d.cts +10 -5
  33. package/dist/eval-shim.mjs +216 -0
  34. package/dist/index.cjs +15 -2
  35. package/dist/index.d.cts +3 -1
  36. package/dist/layer-1-ziaLpfLr.d.cts +62 -0
  37. package/dist/metafile-cjs.json +1 -0
  38. package/dist/reporter-entry.js +3 -0
  39. package/dist/{replay.cjs → sdk/index.cjs} +42979 -40973
  40. package/dist/sdk/index.d.cts +626 -0
  41. package/dist/vitest/{chunk-6CBYFCFK.js → chunk-2PDHTPZC.js} +289 -89
  42. package/dist/vitest/{chunk-ARVS45PP.js → chunk-7L4BBB6M.js} +123 -274
  43. package/dist/vitest/index.cjs +500 -816
  44. package/dist/vitest/index.d.ts +16 -81
  45. package/dist/vitest/index.js +40 -409
  46. package/dist/vitest/runtime/hosted-session-reaper.cjs +143 -293
  47. package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
  48. package/dist/vitest/runtime/setup-files.js +2 -2
  49. package/manifest.json +9 -0
  50. package/package.json +14 -13
  51. package/skills/archal-agent/SKILL.md +0 -1
  52. package/skills/autoloop/SKILL.md +288 -273
  53. package/skills/autoloop/references/hosted-sources.md +49 -17
  54. package/skills/autoloop/references/trace-schema-mapping.md +83 -52
  55. package/skills/eval/SKILL.md +16 -48
  56. package/skills/free-account/SKILL.md +103 -0
  57. package/skills/install-agent/SKILL.md +16 -35
  58. package/skills/onboard/SKILL.md +13 -70
  59. package/skills/scenario/SKILL.md +30 -27
  60. package/skills/seed/SKILL.md +7 -6
  61. package/skills/vitest/SKILL.md +3 -2
  62. package/agents/github-octokit/.archal.json +0 -8
  63. package/agents/github-octokit/Dockerfile +0 -8
  64. package/agents/github-octokit/README.md +0 -113
  65. package/agents/github-octokit/agent.mjs +0 -54
  66. package/agents/github-octokit/package.json +0 -9
  67. package/agents/github-octokit/scenarios/test-repo-access.md +0 -27
  68. package/agents/google-workspace-local-tools/Dockerfile +0 -6
  69. package/agents/google-workspace-local-tools/README.md +0 -58
  70. package/agents/google-workspace-local-tools/agent.mjs +0 -196
  71. package/agents/google-workspace-local-tools/archal-harness.json +0 -7
  72. package/agents/google-workspace-local-tools/run-input.yaml +0 -16
  73. package/agents/google-workspace-local-tools/scenario.md +0 -29
  74. package/agents/hermes/.archal.json +0 -8
  75. package/agents/hermes/Dockerfile +0 -46
  76. package/agents/hermes/README.md +0 -87
  77. package/agents/hermes/SOUL.md +0 -27
  78. package/agents/hermes/config.yaml +0 -34
  79. package/agents/hermes/drive.mjs +0 -113
  80. package/agents/hermes/scenarios/stripe-customers-read-only.md +0 -32
  81. package/agents/pagination-test/README.md +0 -24
  82. package/agents/pagination-test/scenario.md +0 -24
  83. package/agents/replay-capsule-harness/README.md +0 -29
  84. package/agents/replay-capsule-harness/observability-install-offline-e2e.mts +0 -1517
  85. package/agents/replay-capsule-harness/replay-capsule-e2e.mjs +0 -104
  86. package/dist/harness.cjs +0 -63
  87. package/dist/harness.d.cts +0 -20
  88. package/dist/replay.d.cts +0 -4625
  89. package/dist/scenarios.cjs +0 -80343
  90. package/dist/scenarios.d.cts +0 -562
@@ -1,8 +1,27 @@
1
1
  # Hosted database source
2
2
 
3
- Full flag reference for registering a hosted Postgres or Supabase trace source.
4
- Use this when traces live in Postgres or Supabase. Registration posts the source
5
- config to Archal and returns; hosted workers own polling after that.
3
+ Reference for registering a hosted Postgres or Supabase trace source. Use this
4
+ when traces live in Postgres or Supabase. Registration posts the source config to
5
+ Archal and returns; hosted workers own polling after that.
6
+
7
+ The starter takes only `--repo`, `--source`, the credential
8
+ (`--database-url-env` or `--database-url-secret-ref`), `--execution-policy`,
9
+ `--check`, and `--json`. The source identity, schema mapping, cursor, and filters
10
+ live in the `.archal.json` `autoloop` block — see `trace-schema-mapping.md`. A
11
+ minimal config names the source:
12
+
13
+ ```jsonc
14
+ // .archal.json
15
+ {
16
+ "autoloop": {
17
+ "source": { "name": "prod-agent-traces" }
18
+ }
19
+ }
20
+ ```
21
+
22
+ This is the detail behind **Breakpoint 3** in `SKILL.md`: never accept a
23
+ privileged connection string, pass the credential by env-var name (or secret
24
+ ref), and confirm the role is read-only before running any `--source` command.
6
25
 
7
26
  ## Contents
8
27
 
@@ -13,50 +32,63 @@ config to Archal and returns; hosted workers own polling after that.
13
32
 
14
33
  ## Read-only credential
15
34
 
16
- First, create or request a read-only database user. Then keep the URL in an env
17
- var:
35
+ First create (or ask the user to create) a read-only database role scoped to the
36
+ trace tables. For Postgres:
37
+
38
+ ```sql
39
+ CREATE ROLE archal_trace_reader LOGIN PASSWORD '<generated>';
40
+ GRANT CONNECT ON DATABASE <db> TO archal_trace_reader;
41
+ GRANT USAGE ON SCHEMA public TO archal_trace_reader;
42
+ GRANT SELECT ON ai_traces, ai_spans TO archal_trace_reader; -- trace/span tables only
43
+ ```
44
+
45
+ Then keep the URL in an env var; never inline it in a command and never echo it:
18
46
 
19
47
  ```bash
20
- export TRACE_DATABASE_URL='postgres://readonly:...'
48
+ export TRACE_DATABASE_URL='postgres://archal_trace_reader:...'
21
49
  ```
22
50
 
23
51
  ## Check the source
24
52
 
25
- Run a check:
53
+ Run a readiness check. `--check --json` emits `{ ok, checks[], nextStep? }` and
54
+ exits `2` when not ready:
26
55
 
27
56
  ```bash
28
57
  npx archal autoloop \
29
58
  --repo . \
30
59
  --source supabase \
31
60
  --database-url-env TRACE_DATABASE_URL \
32
- --source-id prod-agent-traces \
33
- --check
61
+ --check --json
34
62
  ```
35
63
 
64
+ The source name comes from `autoloop.source.name` in `.archal.json`, not a flag.
65
+
36
66
  ## Register the source
37
67
 
38
- Register:
68
+ Drop `--check` to register:
39
69
 
40
70
  ```bash
41
71
  npx archal autoloop \
42
72
  --repo . \
43
73
  --source supabase \
44
74
  --database-url-env TRACE_DATABASE_URL \
45
- --source-id prod-agent-traces
75
+ --execution-policy reproduce
46
76
  ```
47
77
 
48
- This posts the source config to Archal and returns. It does not start a local
49
- watcher and does not write local source state.
78
+ Set `--execution-policy` to match the Autofix answer from Breakpoint 1
79
+ (`reproduce` = no PRs, `fix` = open PRs). Registration posts the source config to
80
+ Archal and returns. It does not start a local watcher and does not write local
81
+ source state.
50
82
 
51
83
  ## Secret reference (hosted production)
52
84
 
53
- Use a secret reference when the customer already has one:
85
+ Use a secret reference when the customer already has one. The ref must not
86
+ contain a plaintext credential:
54
87
 
55
88
  ```bash
56
89
  npx archal autoloop \
57
90
  --repo . \
58
91
  --source postgres \
59
- --database-url-secret-ref aws-secretsmanager://customer/prod-agent-traces
92
+ --database-url-secret-ref aws-secretsmanager://customer/prod-agent-traces \
93
+ --execution-policy reproduce
60
94
  ```
61
-
62
- `--database-url-secret-ref` must not contain a plaintext credential.
@@ -1,73 +1,104 @@
1
1
  # Trace schema mapping
2
2
 
3
- Full mapping-flag reference for hosted Postgres/Supabase trace sources. Use this
4
- when the customer's trace and span tables do not match the defaults below.
3
+ Config reference for hosted Postgres/Supabase trace sources whose trace and span
4
+ tables do not match the defaults below. Schema mapping, cursor mode, and filters
5
+ live in the `.archal.json` `autoloop` block under `autoloop.source`, not in flags.
5
6
 
6
7
  ## Contents
7
8
 
8
9
  - Defaults
9
- - Custom schema flags
10
+ - Custom schema
10
11
  - Append-only sources
11
12
  - Filters for noisy sources
12
13
 
13
14
  ## Defaults
14
15
 
15
- | Concept | Default |
16
- |---------|---------|
17
- | trace table | `ai_traces` |
18
- | span table | `ai_spans` |
19
- | trace id | `id` |
20
- | span id | `id` |
21
- | span trace id | `trace_id` |
22
- | trace updated cursor | `updated_at` |
23
- | span updated cursor | `updated_at` |
24
- | cursor mode | `updated_at_id` |
25
-
26
- ## Custom schema flags
27
-
28
- For a custom schema, pass mapping flags:
29
-
30
- ```bash
31
- npx archal autoloop \
32
- --repo . \
33
- --source postgres \
34
- --database-url-env TRACE_DATABASE_URL \
35
- --trace-table public.agent_traces \
36
- --span-table public.agent_spans \
37
- --trace-id-column trace_id \
38
- --span-id-column span_id \
39
- --span-trace-id-column trace_id \
40
- --parent-span-id-column parent_span_id \
41
- --trace-updated-at-column updated_at \
42
- --span-updated-at-column updated_at
16
+ | Concept | Config field | Default |
17
+ |---------|--------------|---------|
18
+ | trace table | `source.mapping.traces.table` | `ai_traces` |
19
+ | span table | `source.mapping.spans.table` | `ai_spans` |
20
+ | trace id | `source.mapping.traces.idColumn` | `id` |
21
+ | span id | `source.mapping.spans.idColumn` | `id` |
22
+ | span trace id | `source.mapping.spans.traceIdColumn` | `trace_id` |
23
+ | span parent id | `source.mapping.spans.parentSpanIdColumn` | `parent_span_id` |
24
+ | trace updated cursor | `source.mapping.traces.updatedAtColumn` | `updated_at` |
25
+ | span updated cursor | `source.mapping.spans.updatedAtColumn` | `updated_at` |
26
+ | cursor mode | `source.cursor.mode` | `updated_at_id` |
27
+
28
+ ## Custom schema
29
+
30
+ For a custom schema, set the mapping in `.archal.json`. Only the fields that
31
+ differ from the defaults are required:
32
+
33
+ ```jsonc
34
+ // .archal.json
35
+ {
36
+ "autoloop": {
37
+ "source": {
38
+ "mapping": {
39
+ "traces": {
40
+ "table": "public.agent_traces",
41
+ "idColumn": "trace_id",
42
+ "updatedAtColumn": "updated_at"
43
+ },
44
+ "spans": {
45
+ "table": "public.agent_spans",
46
+ "idColumn": "span_id",
47
+ "traceIdColumn": "trace_id",
48
+ "parentSpanIdColumn": "parent_span_id",
49
+ "updatedAtColumn": "updated_at"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
43
55
  ```
44
56
 
45
57
  ## Append-only sources
46
58
 
47
- For append-only sources:
59
+ For append-only sources, switch the cursor to `created_at_id` and point it at the
60
+ created-at columns:
48
61
 
49
- ```bash
50
- npx archal autoloop \
51
- --repo . \
52
- --source supabase \
53
- --database-url-env TRACE_DATABASE_URL \
54
- --cursor-mode created_at_id \
55
- --trace-created-at-column created_at \
56
- --span-created-at-column created_at
62
+ ```jsonc
63
+ // .archal.json
64
+ {
65
+ "autoloop": {
66
+ "source": {
67
+ "cursor": { "mode": "created_at_id" },
68
+ "mapping": {
69
+ "traces": { "createdAtColumn": "created_at" },
70
+ "spans": { "createdAtColumn": "created_at" }
71
+ }
72
+ }
73
+ }
74
+ }
57
75
  ```
58
76
 
77
+ `source.cursor.watermarks` is a repair escape hatch: set
78
+ `{ traces: { at, id }, spans: { at, id } }` (any of which may be `null`) only when
79
+ you need to re-seat the cursor after a bad import.
80
+
59
81
  ## Filters for noisy sources
60
82
 
61
- Use filters for noisy sources:
62
-
63
- ```bash
64
- npx archal autoloop \
65
- --repo . \
66
- --source supabase \
67
- --database-url-env TRACE_DATABASE_URL \
68
- --source-workspace-id workspace_123 \
69
- --source-agent-id support-agent \
70
- --source-status failed error \
71
- --source-trace-group billing-support \
72
- --source-limit 250
83
+ Use filters to narrow a noisy source. All filter fields are optional:
84
+
85
+ ```jsonc
86
+ // .archal.json
87
+ {
88
+ "autoloop": {
89
+ "source": {
90
+ "filters": {
91
+ "workspaceIds": ["workspace_123"],
92
+ "agentIds": ["support-agent"],
93
+ "statuses": ["failed", "error"],
94
+ "traceGroups": ["billing-support"],
95
+ "limit": 250
96
+ }
97
+ }
98
+ }
99
+ }
73
100
  ```
101
+
102
+ Arbitrary source metadata for the registration goes under `source.metadata` (a
103
+ map of short-identifier keys to string values). Regression scenarios export is a top-level
104
+ `autoloop.benchmarkExport: true` (the config key keeps the legacy `benchmark` name).
@@ -2,7 +2,7 @@
2
2
  name: eval
3
3
  description: Run Archal scenarios or inline tasks against hosted clones, diagnose failed runs, and interpret satisfaction scores. Triggers on "run my scenario", "evaluate my agent", "archal run X", "debug this failing run", "what does this satisfaction score mean".
4
4
  user-invocable: true
5
- argument-hint: "[scenario.md or task description]"
5
+ argument-hint: '[scenario.md or task description]'
6
6
  ---
7
7
 
8
8
  # Archal Eval Runner
@@ -35,14 +35,14 @@ If a local harness returns text but records zero clone-observed calls, check for
35
35
  Scenario from a file:
36
36
 
37
37
  ```bash
38
- archal run scenario.md
39
- archal run scenario.md --runs 5 --seed enterprise-repo # N runs -> satisfaction score
38
+ archal run scenario.md --docker
39
+ archal run scenario.md --docker --runs 5 --seed enterprise-repo # N runs -> satisfaction score
40
40
  ```
41
41
 
42
42
  Inline task (no scenario file):
43
43
 
44
44
  ```bash
45
- archal run --task "Create an issue titled hello" --harness ./.archal/harness.mjs --clone github
45
+ archal run --task "Create an issue titled hello" --harness ./.archal/harness.mjs --docker --clone github
46
46
  ```
47
47
 
48
48
  `--task` only replaces the scenario file - it still needs a runnable agent path. `--clone` is required with `--task`; repeat or comma-separate for multiple clones.
@@ -52,11 +52,13 @@ When `.archal.json` exists in cwd, bare `archal run` uses it. If the user doesn'
52
52
  ## Interpret results
53
53
 
54
54
  Score breakdown:
55
+
55
56
  - `100%` = every run passed every criterion
56
57
  - `80%` = 4/5 runs passed
57
58
  - `0%` = none passed
58
59
 
59
60
  Criterion types:
61
+
60
62
  - `[D]` - deterministic state check. A failure is real; never a model variance artifact.
61
63
  - `[P]` - LLM judge reads trace + final state. A single failure can be variance; re-run with `--runs 3+` to confirm before acting on it.
62
64
 
@@ -65,64 +67,30 @@ Criterion types:
65
67
  Re-run with `-v` for the full trace, then classify with these signals:
66
68
 
67
69
  - **Agent bug** - wrong tool called, wrong arguments, stopped early.
68
- *Signals:* trace shows the correct tool was available but the agent chose another; or arguments are malformed.
69
- *Fix:* agent prompt, tool wiring, or underlying model.
70
+ _Signals:_ trace shows the correct tool was available but the agent chose another; or arguments are malformed.
71
+ _Fix:_ agent prompt, tool wiring, or underlying model.
70
72
 
71
73
  - **Scenario bug** - criteria are too strict, ambiguous, or contradict the Setup.
72
- *Signals:* agent clearly did the right thing but a `[D]` criterion expects an exact count the Setup didn't guarantee; or two criteria contradict each other.
73
- *Fix:* make Setup more specific, or relax the criterion. Use the `scenario` skill.
74
+ _Signals:_ agent clearly did the right thing but a `[D]` criterion expects an exact count the Setup didn't guarantee; or two criteria contradict each other.
75
+ _Fix:_ make Setup more specific, or relax the criterion. Use the `scenario` skill.
74
76
 
75
77
  - **Seed mismatch** - clone state doesn't match what Setup describes.
76
- *Signals:* agent's first introspection tool call returns unexpected state (e.g. Setup says "4 stale issues" but the seed has 3).
77
- *Fix:* different seed, or adjust Setup to match. `archal seed list <clone>` to browse.
78
+ _Signals:_ agent's first introspection tool call returns unexpected state (e.g. Setup says "4 stale issues" but the seed has 3).
79
+ _Fix:_ different seed, or adjust Setup to match. `archal seed list <clone>` to browse.
78
80
 
79
81
  - **Harness bug** - agent process never started, crashed immediately, or hung.
80
- *Signals:* no tool calls in the trace, stderr shows a boot error, or the run times out at the configured `--timeout`.
81
- *Fix:* smoke-test the harness directly with `AGENT_TASK="Reply with OK." node ./.archal/harness.mjs`, then look for an untouched starter stub, UI-only imports, missing provider keys, or interactive auth.
82
+ _Signals:_ no tool calls in the trace, stderr shows a boot error, or the run times out at the configured `--timeout`.
83
+ _Fix:_ smoke-test the harness directly with `AGENT_TASK="Reply with OK." node ./.archal/harness.mjs`, then look for an untouched starter stub, UI-only imports, missing provider keys, or interactive auth.
82
84
 
83
85
  ## CI mode
84
86
 
85
87
  ```bash
86
- archal run scenario.md --runs 3 --pass-threshold 80 -o json -q
88
+ archal run scenario.md --docker --runs 3 --pass-threshold 80 -o json -q
87
89
  ```
88
90
 
89
91
  Exit codes: `0` pass, `1` fail or score < threshold, `2` validation error. For GitHub Actions, inject `ARCHAL_TOKEN` as a secret. Use a workspace API key (`archal_ws_...`) for CI, not a personal token.
90
92
 
91
- Workspace API keys are runtime and CI credentials bound to one workspace. They can run clones, upload and read traces, and read usage for that workspace. They cannot manage audit events or workspace API keys. Use an owner/admin user credential, either `archal login` or a dashboard-issued user API key, for workspace administration.
92
-
93
- ## Pre-production autonomous loop
94
-
95
- Use `archal preprod start` when the user wants a coding agent to run a bounded
96
- pack of scenarios before shipping, remediate failures, rerun, validate, and
97
- open a draft PR. This is different from post-production `archal autoloop`: it
98
- starts from repo scenarios and clone runs, not imported production traces.
99
-
100
- First do a safe dry run:
101
-
102
- ```bash
103
- archal preprod start --scenario-count 20 --dry-run --artifacts .archal/preprod
104
- ```
105
-
106
- Then, only after the dry-run artifacts look like real agent/scenario failures,
107
- allow the managed remediation path:
108
-
109
- ```bash
110
- archal preprod start \
111
- --scenario-count 20 \
112
- --allow-external-execution \
113
- --remediation-agent codex \
114
- --validation-command 'pnpm test' \
115
- --open-pr \
116
- --pr-command 'gh pr create --draft --fill' \
117
- --artifacts .archal/preprod
118
- ```
119
-
120
- Read `.archal/preprod/preprod-result.json`,
121
- `.archal/preprod/preprod-failures.json`, and the remediation context before
122
- summarizing results. Treat runs without validation evidence as local
123
- remediation passes, not release proof. If a run stops after `initial-runs`,
124
- `fix`, or `validation`, resume with `archal preprod start --resume
125
- .archal/preprod --artifacts .archal/preprod`.
93
+ Workspace API keys are runtime and CI credentials bound to one workspace. They can run clones, upload and read traces, and read usage for that workspace. They cannot manage audit events or workspace API keys. Create/list/revoke them with `archal workspace api-key create <label>`, `archal workspace api-keys`, and `archal workspace api-key revoke <key-id>` from an owner/admin user session. Use an owner/admin user credential, either `archal login` or a dashboard-issued user API key, for workspace administration.
126
94
 
127
95
  ## Artifacts + dashboard
128
96
 
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: free-account
3
+ description: B2C free-tier guide — run scenarios and start clones within free entitlements. Use when an orchestrating or coding agent should use Archal under a free user account to "run my agent", evaluate a task against clones, or spin up clones without paid features.
4
+ user-invocable: true
5
+ argument-hint: "[repo, task, or 'run my agent']"
6
+ ---
7
+
8
+ # Archal Free Account
9
+
10
+ You are driving Archal under a free user account. Archal tests AI agents against
11
+ clones of real services (GitHub, Slack, Stripe, etc.). On free, you can run
12
+ scenarios and start clones within the free entitlements. You cannot start any
13
+ autonomous loop, remediation, or observability-install flow. Stay inside the
14
+ allowed commands below and never attempt a blocked one.
15
+
16
+ ## Authenticate first
17
+
18
+ Do this before any other command.
19
+
20
+ ```bash
21
+ archal login # OAuth browser flow -> ~/.archal/credentials.json
22
+ archal usage # verify auth + plan
23
+ ```
24
+
25
+ In CI, skip the browser flow and set a token:
26
+
27
+ ```bash
28
+ export ARCHAL_TOKEN=... # workspace or user token
29
+ archal usage
30
+ ```
31
+
32
+ Sessions are Archal-hosted, so provider credentials may be placeholders. You do
33
+ not need real GitHub, Slack, or Stripe keys to start a clone or run a scenario.
34
+
35
+ ## Free limits
36
+
37
+ State these upfront so the user is not surprised mid-run.
38
+
39
+ | Limit | Free value |
40
+ |-------|-----------|
41
+ | Cost | $0 |
42
+ | Workspace | free workspace entitlements only |
43
+ | Concurrent sessions | 3 |
44
+ | Session TTL | 30 minutes |
45
+ | Credits | 5,000 per month, recurring |
46
+
47
+ If the user asks for paid workspace capabilities, point them to
48
+ https://archal.ai/contact. Do not attempt blocked actions.
49
+
50
+ ## Allowed commands only
51
+
52
+ Use only these on free. Nothing else.
53
+
54
+ ```bash
55
+ archal run <scenario.md> # run a scenario against clones
56
+ archal clone start [clones...] # start one or more hosted clones
57
+ archal clone status # inspect the active session
58
+ archal clone stop # tear the session down
59
+ archal clone # list available clones
60
+ archal clone seed <clone> <name> # apply a named seed to a running clone
61
+ archal scenario list # list scenarios
62
+ archal seed list # list seeds
63
+ archal usage # check plan, credits, and quota
64
+ ```
65
+
66
+ ## Prohibited on free
67
+
68
+ Never instruct any of these. They are Pro features and fail closed: the web
69
+ returns HTTP 402 and the CLI fails closed with an entitlement error. Do not run
70
+ them, do not retry them, and do not describe them as available.
71
+
72
+ - autonomous remediation loops (`archal autoloop ...`)
73
+ - remediation / fix runs
74
+ - `archal autoloop detach`
75
+ - observability-install flow
76
+
77
+ This mirrors the server-side blocked set: `start_loop`, `reproduce_failure`,
78
+ `retry_loop`, `connect_observability`. If the user wants any of these, point
79
+ them to https://archal.ai/contact.
80
+
81
+ ## Quota awareness
82
+
83
+ Check quota with `archal usage` before a run, and watch for quota-exceeded
84
+ results during a run. On quota-exceeded, stop and direct the user to
85
+ https://archal.ai/contact. Do not retry a blocked or over-quota command, and do
86
+ not try to work around the limit.
87
+
88
+ ## What to report back
89
+
90
+ After a run or clone session, give the user:
91
+
92
+ - command run
93
+ - satisfaction score or clone session id
94
+ - credits used and remaining (from `archal usage`)
95
+ - the upgrade pointer (https://archal.ai/contact) if anything was blocked or
96
+ over quota
97
+
98
+ ## Docs
99
+
100
+ - Quickstart: https://docs.archal.ai/quickstart
101
+ - Contact for plan changes: https://archal.ai/contact
102
+ - Writing scenarios: https://docs.archal.ai/guides/writing-scenarios
103
+ - Clones and seeds: https://docs.archal.ai/clones/overview
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: install-agent
3
- description: Connect an agent's repo and its production observability to Archal so its traces get captured and graded. Detects an existing observability stack (LangSmith, Langfuse, Datadog, OpenTelemetry, Braintrust), connects the GitHub App, opens an observability setup PR, and wires an existing trace vendor through `archal trace-source`. USE THIS whenever the user says "connect my agent", "install the Archal agent", "set up observability", "capture my agent's traces", "hook up my production traces", "where do my traces go", or asks how to get an already-running agent into Archal. Reach for it before telling anyone a capability is missing — read the honest limits below first.
3
+ description: Connect an agent's repo and its production observability to Archal so its traces get captured and graded. Detects an existing observability stack (LangSmith, Langfuse, Datadog, OpenTelemetry, Braintrust), connects the GitHub App, opens an observability setup PR, and routes an existing trace vendor's output to the dashboard OTLP endpoint or autoloop hosted ingest. USE THIS whenever the user says "connect my agent", "install the Archal agent", "set up observability", "capture my agent's traces", "hook up my production traces", "where do my traces go", or asks how to get an already-running agent into Archal. Reach for it before telling anyone a capability is missing — read the honest limits below first.
4
4
  user-invocable: true
5
5
  argument-hint: "[repo + where its traces live]"
6
6
  ---
@@ -54,8 +54,8 @@ Before changing anything, read the repo and find out where traces live:
54
54
  ```
55
55
  4. Where do the traces actually go? Ask the user. The answer routes you:
56
56
  - already in a hosted vendor (Langfuse, Braintrust) or a Postgres/Supabase
57
- table -> ingest path (`archal trace-source`, delegate detail to `autoloop`)
58
- - exported files on disk -> `archal trace-source import`
57
+ table -> hosted autoloop ingest path (delegate detail to `autoloop` skill)
58
+ - exported files on disk -> drop into an autoloop watch directory or send via dashboard OTLP
59
59
  - nowhere yet / only app logs -> the observability setup PR
60
60
 
61
61
  Never print secrets while inspecting. Show env var names or secret references,
@@ -139,34 +139,17 @@ to force the deterministic install.
139
139
  ## Step 3 — ingest an existing observability vendor
140
140
 
141
141
  If the agent already emits traces to a vendor, you usually do **not** need the
142
- setup PR you normalize the existing traces with `archal trace-source`. This is
143
- the genuine ingest path. It maps a vendor's payloads into Archal's trace upload
144
- envelopes and uploads them to hosted autoloop when workspace auth is present.
145
-
146
- Supported providers: `langfuse`, `braintrust`, `otel`, `http`, `supabase`,
147
- `postgres`, `file`, `custom`. Pull/sync vendors (`langfuse`, `braintrust`,
148
- Postgres/Supabase) are fetched on a cursor; push sources (`otel`, `http`,
149
- `custom`) receive traces continuously through `serve`.
150
-
151
- The command surface:
152
-
153
- ```bash
154
- archal trace-source connect <provider> # register a source (e.g. langfuse, braintrust, otel, custom)
155
- archal trace-source test [source] # validate credentials and reachability
156
- archal trace-source sync [source] # pull-fetch new traces (langfuse/braintrust/db)
157
- archal trace-source watch [source] # continuous pull loop
158
- archal trace-source serve [source] # receiver for push sources (otel/http/custom)
159
- archal trace-source import <path> # normalize exported trace files on disk
160
- archal trace-source status [source] # registry validation, cursor, last-sync state
161
- archal trace-source list # registered sources
162
- archal trace-source use|disable <source> # select / disable a source
163
- ```
142
+ setup PR. The two ingest paths are:
143
+
144
+ - **Dashboard OTLP endpoint** point the vendor's exporter at the Archal OTLP
145
+ URL shown in the dashboard. Works for OpenTelemetry-compatible vendors (OTel,
146
+ Langfuse, Braintrust, Datadog, custom HTTP). No CLI command required.
147
+ - **Hosted autoloop** — for Postgres/Supabase sources, register the source with
148
+ `archal autoloop --source ...`. Archal polls the database directly.
164
149
 
165
150
  **Delegate the deep mapping to the `autoloop` skill.** It owns the per-vendor
166
- flags (`--base-url`, `--api-key-env`, `--out`, `--upload`, `--repository`,
167
- schema/cursor/filter mapping for database sources) and the full
168
- import/grade/reproduce/fix loop. Quote the command names here; point the user
169
- there for the flag detail and the autoloop wiring.
151
+ flags, schema/cursor/filter mapping for database sources, and the full
152
+ import/grade/reproduce/fix loop.
170
153
 
171
154
  ## The honest limit
172
155
 
@@ -195,9 +178,8 @@ Classify precisely; do not paper over a missing precondition:
195
178
  is not a failure, just a narrower install.
196
179
  - **Setup PR is a stub for this repo** — large/unusual layout; the user finishes
197
180
  wiring. Not a bug; the honest limit.
198
- - **Trace ingest failure** — `trace-source` adapter mismatch, bad credential,
199
- rejected upload, or missing workspace auth. Use `archal trace-source test` and
200
- `status` to localize it.
181
+ - **Trace ingest failure** — bad credential, rejected upload, or missing workspace auth.
182
+ Check the dashboard OTLP endpoint config or `archal autoloop status` for the hosted path.
201
183
  - **No usable trace evidence** — once ingested, grading or reproduction can still
202
184
  block if the trace lacks task context or state. Hand off to the `autoloop`
203
185
  skill's evidence diagnosis.
@@ -207,15 +189,14 @@ Classify precisely; do not paper over a missing precondition:
207
189
  After install or debugging, give the user:
208
190
 
209
191
  - repo full name and whether the GitHub App is connected
210
- - chosen path: setup PR (greenfield vs augment) or `trace-source` ingest
192
+ - chosen path: setup PR (greenfield vs augment) or hosted autoloop / dashboard OTLP ingest
211
193
  - if a setup PR: the install mode, the files it adds, and whether the planner ran
212
- - if ingest: provider, source id, and the next `archal trace-source` command
194
+ - if ingest: provider, source id, and the next step (dashboard OTLP config or `archal autoloop` command)
213
195
  - whether traces are flowing into Archal yet, or the exact blocker
214
196
  - next command or next owner
215
197
 
216
198
  ## Docs
217
199
 
218
200
  - Autoloop production traces: https://docs.archal.ai/guides/autoloop-production-traces
219
- - Autonomous loops: https://docs.archal.ai/guides/autoloop-production-traces
220
201
  - CLI reference: https://docs.archal.ai/cli/autoloop
221
202
  - Quickstart: https://docs.archal.ai/quickstart