@ai-outfitter/outfitter 1.7.1 → 1.8.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/code/pi-extension/src/outfitter-extension.js +7 -1
- package/dist/cli/commands/RunAgentCommand.js +11 -2
- package/dist/cli/commands/RunAgentCommand.js.map +1 -1
- package/dist/cli.d.ts +12 -1
- package/dist/cli.js +92 -1
- package/dist/cli.js.map +1 -1
- package/dist/paths/OutfitterCache.d.ts +2 -0
- package/dist/paths/OutfitterCache.js +8 -0
- package/dist/paths/OutfitterCache.js.map +1 -1
- package/dist/projection/ProjectHarness.js +10 -8
- package/dist/projection/ProjectHarness.js.map +1 -1
- package/dist/schemas/settings.schema.json +11 -0
- package/dist/settings/Settings.d.ts +4 -0
- package/dist/settings/Settings.js.map +1 -1
- package/dist/settings/SettingsLoader.js +4 -1
- package/dist/settings/SettingsLoader.js.map +1 -1
- package/dist/settings/SettingsMerger.js +3 -0
- package/dist/settings/SettingsMerger.js.map +1 -1
- package/dist/setup/Setup.d.ts +1 -1
- package/dist/setup/Setup.js +16 -6
- package/dist/setup/Setup.js.map +1 -1
- package/dist/telemetry/CiEnvironment.d.ts +6 -0
- package/dist/telemetry/CiEnvironment.js +4 -0
- package/dist/telemetry/CiEnvironment.js.map +1 -0
- package/dist/telemetry/TelemetryConsent.d.ts +8 -0
- package/dist/telemetry/TelemetryConsent.js +39 -0
- package/dist/telemetry/TelemetryConsent.js.map +1 -0
- package/dist/telemetry/TelemetryConstants.d.ts +4 -0
- package/dist/telemetry/TelemetryConstants.js +5 -0
- package/dist/telemetry/TelemetryConstants.js.map +1 -0
- package/dist/telemetry/TelemetryContext.d.ts +15 -0
- package/dist/telemetry/TelemetryContext.js +13 -0
- package/dist/telemetry/TelemetryContext.js.map +1 -0
- package/dist/telemetry/TelemetryService.d.ts +57 -0
- package/dist/telemetry/TelemetryService.js +157 -0
- package/dist/telemetry/TelemetryService.js.map +1 -0
- package/dist/telemetry/TelemetryState.d.ts +11 -0
- package/dist/telemetry/TelemetryState.js +51 -0
- package/dist/telemetry/TelemetryState.js.map +1 -0
- package/dist/version/OutfitterVersion.js +6 -3
- package/dist/version/OutfitterVersion.js.map +1 -1
- package/docs/documentation/README.md +2 -0
- package/docs/documentation/channels.md +112 -0
- package/docs/documentation/cli.md +9 -0
- package/docs/documentation/settings.md +5 -0
- package/docs/documentation/support-matrix.md +3 -2
- package/docs/documentation/telemetry.md +70 -0
- package/package.json +4 -2
- package/src/schemas/settings.schema.json +11 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Telemetry
|
|
2
|
+
|
|
3
|
+
Outfitter includes opt-outable pseudonymous product analytics to measure command adoption and reliability. The shipped PostHog API key is currently empty, so no build produced from this repository sends telemetry. Provisioning a key is deferred maintainer work. The consent setting still defaults to enabled and can be changed at any time.
|
|
4
|
+
|
|
5
|
+
In a future build with a provisioned key, 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. With the current empty key, telemetry is inert: it creates no client or state, sends no events, and prints no notice.
|
|
6
|
+
|
|
7
|
+
## Event contract
|
|
8
|
+
|
|
9
|
+
Outfitter sends exactly two event types: `cli command started` and `cli command completed`.
|
|
10
|
+
|
|
11
|
+
Both events contain only these properties:
|
|
12
|
+
|
|
13
|
+
| Property | Values |
|
|
14
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `command` | A registered top-level command (`run`, `setup`, `sync`, `list`, `validate`, or `dump`), or `unknown`. |
|
|
16
|
+
| `outfitter_version` | The installed Outfitter version. |
|
|
17
|
+
| `node_major` | The integer Node.js major version. |
|
|
18
|
+
| `os_family` | `aix`, `android`, `darwin`, `freebsd`, `linux`, `openbsd`, `sunos`, `win32`, or `unknown`. |
|
|
19
|
+
| `arch` | `arm`, `arm64`, `ia32`, `loong64`, `mips`, `mipsel`, `ppc`, `ppc64`, `riscv64`, `s390`, `s390x`, `x64`, or `unknown`. |
|
|
20
|
+
| `interactive` | `true` or `false`. |
|
|
21
|
+
| `harness` | `pi`, `claude`, `codex`, or `unknown`. |
|
|
22
|
+
| `strict` | `true` or `false`. |
|
|
23
|
+
| `is_ci` | `true` when a CI environment is detected; otherwise `false`. |
|
|
24
|
+
| `ci_name` | Lowercased `ci-info` vendor ID, `unknown` for unidentified CI, or `none` outside CI. |
|
|
25
|
+
| `$process_person_profile` | Always `false`; PostHog does not create or update a person profile. |
|
|
26
|
+
|
|
27
|
+
The completed event also contains:
|
|
28
|
+
|
|
29
|
+
| Property | Values |
|
|
30
|
+
| ---------------------- | ---------------------------------- |
|
|
31
|
+
| `outcome` | `success` or `error`. |
|
|
32
|
+
| `duration_bucket` | `<1s`, `1-5s`, `5-30s`, or `30s+`. |
|
|
33
|
+
| `exit_code_class` | `success` or `error`. |
|
|
34
|
+
| `warning_count_bucket` | `0`, `1-5`, `5+`, or `unknown`. |
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
## Data never collected
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
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.
|
|
45
|
+
|
|
46
|
+
## Where the data goes
|
|
47
|
+
|
|
48
|
+
When a maintainer provisions a PostHog key, events go to PostHog Cloud US at `https://us.i.posthog.com`. No retention period is stated here because this repository does not currently configure one.
|
|
49
|
+
|
|
50
|
+
## Control telemetry
|
|
51
|
+
|
|
52
|
+
The source-of-truth setting is `telemetry.enabled` in `~/.agents/settings.yml`:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
telemetry:
|
|
56
|
+
enabled: false
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
If an applicable settings file cannot be parsed or validated, telemetry fails closed and a non-CI invocation removes any stored installation identifier.
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
These environment variables disable capture for the current process:
|
|
66
|
+
|
|
67
|
+
- `OUTFITTER_TELEMETRY=0`
|
|
68
|
+
- `DO_NOT_TRACK=1`
|
|
69
|
+
|
|
70
|
+
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.
|
|
3
|
+
"version": "1.8.0",
|
|
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": {
|