@ai-outfitter/outfitter 1.7.1 → 1.8.1

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 (49) hide show
  1. package/code/pi-extension/src/outfitter-extension.js +7 -1
  2. package/dist/cli/commands/RunAgentCommand.js +11 -2
  3. package/dist/cli/commands/RunAgentCommand.js.map +1 -1
  4. package/dist/cli.d.ts +12 -1
  5. package/dist/cli.js +92 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/paths/OutfitterCache.d.ts +2 -0
  8. package/dist/paths/OutfitterCache.js +8 -0
  9. package/dist/paths/OutfitterCache.js.map +1 -1
  10. package/dist/projection/ProjectHarness.js +10 -8
  11. package/dist/projection/ProjectHarness.js.map +1 -1
  12. package/dist/schemas/settings.schema.json +11 -0
  13. package/dist/settings/Settings.d.ts +4 -0
  14. package/dist/settings/Settings.js.map +1 -1
  15. package/dist/settings/SettingsLoader.js +4 -1
  16. package/dist/settings/SettingsLoader.js.map +1 -1
  17. package/dist/settings/SettingsMerger.js +3 -0
  18. package/dist/settings/SettingsMerger.js.map +1 -1
  19. package/dist/setup/Setup.d.ts +1 -1
  20. package/dist/setup/Setup.js +16 -6
  21. package/dist/setup/Setup.js.map +1 -1
  22. package/dist/telemetry/CiEnvironment.d.ts +6 -0
  23. package/dist/telemetry/CiEnvironment.js +4 -0
  24. package/dist/telemetry/CiEnvironment.js.map +1 -0
  25. package/dist/telemetry/TelemetryConsent.d.ts +8 -0
  26. package/dist/telemetry/TelemetryConsent.js +39 -0
  27. package/dist/telemetry/TelemetryConsent.js.map +1 -0
  28. package/dist/telemetry/TelemetryConstants.d.ts +10 -0
  29. package/dist/telemetry/TelemetryConstants.js +11 -0
  30. package/dist/telemetry/TelemetryConstants.js.map +1 -0
  31. package/dist/telemetry/TelemetryContext.d.ts +15 -0
  32. package/dist/telemetry/TelemetryContext.js +13 -0
  33. package/dist/telemetry/TelemetryContext.js.map +1 -0
  34. package/dist/telemetry/TelemetryService.d.ts +57 -0
  35. package/dist/telemetry/TelemetryService.js +157 -0
  36. package/dist/telemetry/TelemetryService.js.map +1 -0
  37. package/dist/telemetry/TelemetryState.d.ts +11 -0
  38. package/dist/telemetry/TelemetryState.js +51 -0
  39. package/dist/telemetry/TelemetryState.js.map +1 -0
  40. package/dist/version/OutfitterVersion.js +6 -3
  41. package/dist/version/OutfitterVersion.js.map +1 -1
  42. package/docs/documentation/README.md +2 -0
  43. package/docs/documentation/channels.md +112 -0
  44. package/docs/documentation/cli.md +9 -0
  45. package/docs/documentation/settings.md +5 -0
  46. package/docs/documentation/support-matrix.md +3 -2
  47. package/docs/documentation/telemetry.md +72 -0
  48. package/package.json +4 -2
  49. package/src/schemas/settings.schema.json +11 -0
@@ -23,7 +23,7 @@ Tasks and bake are not in this matrix — they are the subject of a [separate up
23
23
  | Knowledge (`knowledge/`) | Supported | Partial | Roadmap |
24
24
  | Model selection (`models.json`) | Supported | Partial | Partial |
25
25
  | MCP servers (`mcp.json`) | Supported | Supported | Partial |
26
- | Extensions (agent `extensions:` loadout) | Supported | Roadmap | Roadmap |
26
+ | Extensions (agent `extensions:` loadout) | Supported | Pi only | Pi only |
27
27
  | Plugins (agent `plugins:` loadout) | Supported | Roadmap | Roadmap |
28
28
  | Credentials and environment | Supported | Supported | Roadmap |
29
29
  | DeepWork job selection | Supported | Roadmap | Roadmap |
@@ -38,7 +38,8 @@ Tasks and bake are not in this matrix — they are the subject of a [separate up
38
38
 
39
39
  - **Launch mode** — Outfitter launches `codex` directly. Pass-through arguments choose the native mode: no subcommand keeps the interactive CLI shape, while `-- exec ...` selects non-interactive `codex exec`.
40
40
  - **Agent identity and appended prompts** — Codex has no native identity projection yet: launches drop the composed identity/system prompt and any `--append-prompt` documents, supplied documents produce a separate warning, and `--strict` aborts before execution.
41
- - **Model selection (Partial)** — an agent's model maps to `-m`. Provider maps have no projection element and produce no warning. Thinking, tools, skills, subagents, extensions, plugins, and prompt templates remain unsupported and warn when selected.
41
+ - **Model selection (Partial)** — an agent's model maps to `-m`. Provider maps have no projection element and produce no warning. Thinking, tools, skills, subagents, plugins, and prompt templates remain unsupported and warn when selected.
42
+ - **Extensions (Pi only)** — `extensions:` names pi extension packages, so a Codex or Claude Code launch installs none of them. This is a property of the element, not a gap a user can close, so it produces no warning and does not fail under `--strict`.
42
43
  - **MCP servers (Partial)** — selected stdio fields (`command`, `args`, `env`, `cwd`) and streamable HTTP fields (`url`, `headers`) become repeated TOML-valued `-c mcp_servers.<id>.<key>=...` overrides. Server ids must contain only letters, digits, `_`, or `-`; other ids cannot be expressed by Codex `-c` key paths and are skipped with a warning. Legacy SSE and other HTTP transport types are also skipped with a warning. User and project `config.toml` servers remain active because Codex has no strict MCP isolation mode, so every launch warns that projection is additive, even when no servers are selected.
43
44
  - **Stdio environment safety** — `${ENV_NAME}` becomes an `env_vars` reference only when the stdio `env` key is also `ENV_NAME`; a reference that would rename the variable is dropped with a warning. Literal values pass through `env` and are visible in process arguments.
44
45
  - **HTTP header safety** — `${ENV_NAME}` becomes an `env_http_headers` reference, while `Authorization: Bearer ${ENV_NAME}` becomes `bearer_token_env_var`. Other header values pass through `http_headers` and are visible in process arguments. Outfitter warns for every literal stdio environment or HTTP header entry exposed in argv, so use environment references for secrets.
@@ -0,0 +1,72 @@
1
+ # Telemetry
2
+
3
+ Outfitter includes opt-outable pseudonymous product analytics to measure command adoption and reliability. A PostHog key is provisioned, so builds produced from this repository do send telemetry. The consent setting defaults to enabled and can be changed at any time.
4
+
5
+ The first command that would send an event prints a one-time notice to stderr. The notice explains what is collected, what is excluded, and how to opt out.
6
+
7
+ Earlier builds shipped an empty key and were fully inert: they created no client or state, sent no events, and printed no notice.
8
+
9
+ ## Event contract
10
+
11
+ Outfitter sends exactly two event types: `cli command started` and `cli command completed`.
12
+
13
+ Both events contain only these properties:
14
+
15
+ | Property | Values |
16
+ | ------------------------- | --------------------------------------------------------------------------------------------------------------------- |
17
+ | `command` | A registered top-level command (`run`, `setup`, `sync`, `list`, `validate`, or `dump`), or `unknown`. |
18
+ | `outfitter_version` | The installed Outfitter version. |
19
+ | `node_major` | The integer Node.js major version. |
20
+ | `os_family` | `aix`, `android`, `darwin`, `freebsd`, `linux`, `openbsd`, `sunos`, `win32`, or `unknown`. |
21
+ | `arch` | `arm`, `arm64`, `ia32`, `loong64`, `mips`, `mipsel`, `ppc`, `ppc64`, `riscv64`, `s390`, `s390x`, `x64`, or `unknown`. |
22
+ | `interactive` | `true` or `false`. |
23
+ | `harness` | `pi`, `claude`, `codex`, or `unknown`. |
24
+ | `strict` | `true` or `false`. |
25
+ | `is_ci` | `true` when a CI environment is detected; otherwise `false`. |
26
+ | `ci_name` | Lowercased `ci-info` vendor ID, `unknown` for unidentified CI, or `none` outside CI. |
27
+ | `$process_person_profile` | Always `false`; PostHog does not create or update a person profile. |
28
+
29
+ The completed event also contains:
30
+
31
+ | Property | Values |
32
+ | ---------------------- | ---------------------------------- |
33
+ | `outcome` | `success` or `error`. |
34
+ | `duration_bucket` | `<1s`, `1-5s`, `5-30s`, or `30s+`. |
35
+ | `exit_code_class` | `success` or `error`. |
36
+ | `warning_count_bucket` | `0`, `1-5`, `5+`, or `unknown`. |
37
+
38
+ The CLI boundary does not currently have a warning counter, so `warning_count_bucket` is always `unknown`. GeoIP enrichment is disabled on the PostHog client.
39
+
40
+ ## Data never collected
41
+
42
+ Beyond the low-cardinality `harness` and `strict` values listed above, Outfitter never sends command arguments, pass-through arguments, prompts or responses, paths, repository data, agent or profile names, settings, raw environment values, error text, stack traces, session identifiers, child-process output, hostnames, usernames, or hardware identifiers.
43
+
44
+ Outside CI, the pseudonymous installation identifier is a random UUID. It is created lazily on the first capture and stored with the one-time-notice flag at `$XDG_STATE_HOME/outfitter/telemetry.json`, or `~/.local/state/outfitter/telemetry.json` when `XDG_STATE_HOME` is unset or blank. It is deliberately kept outside `~/.agents` so it cannot be committed with shared configuration.
45
+
46
+ In CI, telemetry remains enabled according to the same consent rules and events are sent with `is_ci: true` and the detected `ci_name`. All runs from one CI vendor share a synthetic identifier such as `ci.github_actions`; unidentified CI uses `ci.unknown`. CI runs do not read or create `telemetry.json` and do not print the first-run notice. Set `CI=false` exactly to bypass CI detection and use the normal non-CI UUID identity and state behavior.
47
+
48
+ ## Where the data goes
49
+
50
+ Events go to the `ai-outfitter` organization's PostHog project on PostHog Cloud US at `https://us.i.posthog.com`. No retention period is stated here because this repository does not currently configure one.
51
+
52
+ ## Control telemetry
53
+
54
+ The source-of-truth setting is `telemetry.enabled` in `~/.agents/settings.yml`:
55
+
56
+ ```yaml
57
+ telemetry:
58
+ enabled: false
59
+ ```
60
+
61
+ Telemetry defaults to enabled when the setting is absent. Only user and user-local settings can enable it. A `false` value in user, user-local, project, or project-local settings disables it; remote or catalog settings cannot enable telemetry.
62
+
63
+ If an applicable settings file cannot be parsed or validated, telemetry fails closed and a non-CI invocation removes any stored installation identifier.
64
+
65
+ This settings entry is the sole persistent telemetry control. Edit the file directly to toggle it; Outfitter does not expose a telemetry command. When consent is disabled by this setting, invalid settings, or a process environment opt-out, Outfitter automatically deletes any stored pseudonymous installation identifier. If no identifier exists, cleanup remains inert and creates nothing.
66
+
67
+ These environment variables disable capture for the current process:
68
+
69
+ - `OUTFITTER_TELEMETRY=0`
70
+ - `DO_NOT_TRACK=1`
71
+
72
+ At exit, Outfitter gives queued analytics at most 1000 ms to shut down. Analytics failures or dropped networks never change command output, behavior, or exit status. They never delay exit beyond that budget.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-outfitter/outfitter",
3
- "version": "1.7.1",
3
+ "version": "1.8.1",
4
4
  "description": "Profile-oriented wrapper for launching pi, Claude Code, and future agent CLIs with reproducible configuration.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -36,15 +36,17 @@
36
36
  "test": "vitest --run",
37
37
  "coverage": "vitest --run --coverage",
38
38
  "check": "npm run lint:fix && npm run coverage",
39
- "check-ci": "prettier --check . && npm run lint && npm run coverage"
39
+ "check-ci": "prettier --check . --ignore-path ../../.prettierignore && npm run lint && npm run coverage"
40
40
  },
41
41
  "dependencies": {
42
42
  "@earendil-works/pi-coding-agent": "^0.80.3",
43
43
  "ajv": "^8.20.0",
44
44
  "chalk": "^5.6.2",
45
+ "ci-info": "^4.4.0",
45
46
  "commander": "^14.0.3",
46
47
  "cross-spawn": "^7.0.6",
47
48
  "liquidjs": "^10.27.0",
49
+ "posthog-node": "^5.49.1",
48
50
  "yaml": "^2.9.0"
49
51
  },
50
52
  "devDependencies": {
@@ -34,6 +34,17 @@
34
34
  },
35
35
  "additionalProperties": false
36
36
  },
37
+ "telemetry": {
38
+ "type": "object",
39
+ "description": "Controls pseudonymous Outfitter product analytics.",
40
+ "properties": {
41
+ "enabled": {
42
+ "type": "boolean",
43
+ "description": "Enable or disable pseudonymous Outfitter product analytics. Defaults to enabled."
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ },
37
48
  "sources": {
38
49
  "type": "array",
39
50
  "items": {