@phigon/observer 8.0.2 → 8.1.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 (299) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +333 -303
  4. package/THIRD_PARTY_NOTICES.md +610 -0
  5. package/dist/bin/guardian-runner-darwin-amd64 +0 -0
  6. package/dist/bin/guardian-runner-darwin-arm64 +0 -0
  7. package/dist/bin/guardian-runner-linux-amd64 +0 -0
  8. package/dist/bin/guardian-runner-linux-arm64 +0 -0
  9. package/dist/bin/guardian-runner-windows-amd64.exe +0 -0
  10. package/dist/bin/guardian-runner-windows-arm64.exe +0 -0
  11. package/dist/src/action-policy.d.ts +0 -0
  12. package/dist/src/action-policy.d.ts.map +0 -0
  13. package/dist/src/action-policy.js +0 -0
  14. package/dist/src/action-policy.js.map +0 -0
  15. package/dist/src/activity/adapters/claude.d.ts +0 -0
  16. package/dist/src/activity/adapters/claude.d.ts.map +0 -0
  17. package/dist/src/activity/adapters/claude.js +0 -0
  18. package/dist/src/activity/adapters/claude.js.map +0 -0
  19. package/dist/src/activity/adapters/codex.d.ts +0 -0
  20. package/dist/src/activity/adapters/codex.d.ts.map +0 -0
  21. package/dist/src/activity/adapters/codex.js +0 -0
  22. package/dist/src/activity/adapters/codex.js.map +0 -0
  23. package/dist/src/activity/adapters/copilot.d.ts +0 -0
  24. package/dist/src/activity/adapters/copilot.d.ts.map +0 -0
  25. package/dist/src/activity/adapters/copilot.js +0 -0
  26. package/dist/src/activity/adapters/copilot.js.map +0 -0
  27. package/dist/src/activity/adapters/generic.d.ts +0 -0
  28. package/dist/src/activity/adapters/generic.d.ts.map +0 -0
  29. package/dist/src/activity/adapters/generic.js +0 -0
  30. package/dist/src/activity/adapters/generic.js.map +0 -0
  31. package/dist/src/activity/adapters/hermes.d.ts +0 -0
  32. package/dist/src/activity/adapters/hermes.d.ts.map +0 -0
  33. package/dist/src/activity/adapters/hermes.js +0 -0
  34. package/dist/src/activity/adapters/hermes.js.map +0 -0
  35. package/dist/src/activity/adapters/openai-compatible.d.ts +0 -0
  36. package/dist/src/activity/adapters/openai-compatible.d.ts.map +0 -0
  37. package/dist/src/activity/adapters/openai-compatible.js +0 -0
  38. package/dist/src/activity/adapters/openai-compatible.js.map +0 -0
  39. package/dist/src/activity/adapters/openclaw.d.ts +0 -0
  40. package/dist/src/activity/adapters/openclaw.d.ts.map +0 -0
  41. package/dist/src/activity/adapters/openclaw.js +0 -0
  42. package/dist/src/activity/adapters/openclaw.js.map +0 -0
  43. package/dist/src/activity/adapters/opencode.d.ts +0 -0
  44. package/dist/src/activity/adapters/opencode.d.ts.map +0 -0
  45. package/dist/src/activity/adapters/opencode.js +0 -0
  46. package/dist/src/activity/adapters/opencode.js.map +0 -0
  47. package/dist/src/activity/bridges.d.ts +0 -0
  48. package/dist/src/activity/bridges.d.ts.map +0 -0
  49. package/dist/src/activity/bridges.js +0 -0
  50. package/dist/src/activity/bridges.js.map +0 -0
  51. package/dist/src/activity/collector.d.ts +0 -0
  52. package/dist/src/activity/collector.d.ts.map +0 -0
  53. package/dist/src/activity/collector.js +0 -0
  54. package/dist/src/activity/collector.js.map +0 -0
  55. package/dist/src/activity/index.d.ts +0 -0
  56. package/dist/src/activity/index.d.ts.map +0 -0
  57. package/dist/src/activity/index.js +0 -0
  58. package/dist/src/activity/index.js.map +0 -0
  59. package/dist/src/activity/ingest.d.ts +0 -0
  60. package/dist/src/activity/ingest.d.ts.map +0 -0
  61. package/dist/src/activity/ingest.js +0 -0
  62. package/dist/src/activity/ingest.js.map +0 -0
  63. package/dist/src/activity/native-capabilities.d.ts +0 -0
  64. package/dist/src/activity/native-capabilities.d.ts.map +0 -0
  65. package/dist/src/activity/native-capabilities.js +0 -0
  66. package/dist/src/activity/native-capabilities.js.map +0 -0
  67. package/dist/src/activity/normalize.d.ts +0 -0
  68. package/dist/src/activity/normalize.d.ts.map +0 -0
  69. package/dist/src/activity/normalize.js +0 -0
  70. package/dist/src/activity/normalize.js.map +0 -0
  71. package/dist/src/activity/opencode-sqlite-source.d.ts +0 -0
  72. package/dist/src/activity/opencode-sqlite-source.d.ts.map +0 -0
  73. package/dist/src/activity/opencode-sqlite-source.js +0 -0
  74. package/dist/src/activity/opencode-sqlite-source.js.map +0 -0
  75. package/dist/src/activity/policy.d.ts +0 -0
  76. package/dist/src/activity/policy.d.ts.map +1 -1
  77. package/dist/src/activity/policy.js +2 -13
  78. package/dist/src/activity/policy.js.map +1 -1
  79. package/dist/src/activity/record.d.ts +0 -0
  80. package/dist/src/activity/record.d.ts.map +0 -0
  81. package/dist/src/activity/record.js +0 -0
  82. package/dist/src/activity/record.js.map +0 -0
  83. package/dist/src/activity/source-reader.d.ts +0 -0
  84. package/dist/src/activity/source-reader.d.ts.map +0 -0
  85. package/dist/src/activity/source-reader.js +0 -0
  86. package/dist/src/activity/source-reader.js.map +0 -0
  87. package/dist/src/activity/types.d.ts +0 -0
  88. package/dist/src/activity/types.d.ts.map +0 -0
  89. package/dist/src/activity/types.js +0 -0
  90. package/dist/src/activity/types.js.map +0 -0
  91. package/dist/src/agent-action-executor.d.ts +1 -0
  92. package/dist/src/agent-action-executor.d.ts.map +1 -1
  93. package/dist/src/agent-action-executor.js +6 -1
  94. package/dist/src/agent-action-executor.js.map +1 -1
  95. package/dist/src/agentic-guardian.d.ts +0 -0
  96. package/dist/src/agentic-guardian.d.ts.map +0 -0
  97. package/dist/src/agentic-guardian.js +0 -0
  98. package/dist/src/agentic-guardian.js.map +0 -0
  99. package/dist/src/atomic-replace.d.ts +0 -0
  100. package/dist/src/atomic-replace.d.ts.map +0 -0
  101. package/dist/src/atomic-replace.js +0 -0
  102. package/dist/src/atomic-replace.js.map +0 -0
  103. package/dist/src/cli.d.ts +0 -0
  104. package/dist/src/cli.d.ts.map +1 -1
  105. package/dist/src/cli.js +50 -4
  106. package/dist/src/cli.js.map +1 -1
  107. package/dist/src/config.d.ts +2 -0
  108. package/dist/src/config.d.ts.map +1 -1
  109. package/dist/src/config.js +6 -1
  110. package/dist/src/config.js.map +1 -1
  111. package/dist/src/connection-config.d.ts +3 -0
  112. package/dist/src/connection-config.d.ts.map +1 -0
  113. package/dist/src/connection-config.js +24 -0
  114. package/dist/src/connection-config.js.map +1 -0
  115. package/dist/src/content-redaction.d.ts +3 -0
  116. package/dist/src/content-redaction.d.ts.map +1 -0
  117. package/dist/src/content-redaction.js +12 -0
  118. package/dist/src/content-redaction.js.map +1 -0
  119. package/dist/src/credential-store.d.ts +1 -0
  120. package/dist/src/credential-store.d.ts.map +1 -1
  121. package/dist/src/credential-store.js +11 -1
  122. package/dist/src/credential-store.js.map +1 -1
  123. package/dist/src/custom-agent-registry.d.ts +0 -0
  124. package/dist/src/custom-agent-registry.d.ts.map +0 -0
  125. package/dist/src/custom-agent-registry.js +0 -0
  126. package/dist/src/custom-agent-registry.js.map +0 -0
  127. package/dist/src/discovery/adapters/claude.d.ts +0 -0
  128. package/dist/src/discovery/adapters/claude.d.ts.map +0 -0
  129. package/dist/src/discovery/adapters/claude.js +0 -0
  130. package/dist/src/discovery/adapters/claude.js.map +0 -0
  131. package/dist/src/discovery/adapters/codex.d.ts +0 -0
  132. package/dist/src/discovery/adapters/codex.d.ts.map +0 -0
  133. package/dist/src/discovery/adapters/codex.js +0 -0
  134. package/dist/src/discovery/adapters/codex.js.map +0 -0
  135. package/dist/src/discovery/adapters/custom.d.ts +0 -0
  136. package/dist/src/discovery/adapters/custom.d.ts.map +0 -0
  137. package/dist/src/discovery/adapters/custom.js +0 -0
  138. package/dist/src/discovery/adapters/custom.js.map +0 -0
  139. package/dist/src/discovery/adapters/generic.d.ts +0 -0
  140. package/dist/src/discovery/adapters/generic.d.ts.map +0 -0
  141. package/dist/src/discovery/adapters/generic.js +0 -0
  142. package/dist/src/discovery/adapters/generic.js.map +0 -0
  143. package/dist/src/discovery/adapters/hermes.d.ts +0 -0
  144. package/dist/src/discovery/adapters/hermes.d.ts.map +0 -0
  145. package/dist/src/discovery/adapters/hermes.js +0 -0
  146. package/dist/src/discovery/adapters/hermes.js.map +0 -0
  147. package/dist/src/discovery/adapters/openclaw.d.ts +0 -0
  148. package/dist/src/discovery/adapters/openclaw.d.ts.map +0 -0
  149. package/dist/src/discovery/adapters/openclaw.js +0 -0
  150. package/dist/src/discovery/adapters/openclaw.js.map +0 -0
  151. package/dist/src/discovery/engine.d.ts +0 -0
  152. package/dist/src/discovery/engine.d.ts.map +0 -0
  153. package/dist/src/discovery/engine.js +0 -0
  154. package/dist/src/discovery/engine.js.map +0 -0
  155. package/dist/src/discovery/evidence.d.ts +0 -0
  156. package/dist/src/discovery/evidence.d.ts.map +0 -0
  157. package/dist/src/discovery/evidence.js +0 -0
  158. package/dist/src/discovery/evidence.js.map +0 -0
  159. package/dist/src/discovery/index.d.ts +0 -0
  160. package/dist/src/discovery/index.d.ts.map +0 -0
  161. package/dist/src/discovery/index.js +0 -0
  162. package/dist/src/discovery/index.js.map +0 -0
  163. package/dist/src/discovery/known-agent.d.ts +0 -0
  164. package/dist/src/discovery/known-agent.d.ts.map +0 -0
  165. package/dist/src/discovery/known-agent.js +0 -0
  166. package/dist/src/discovery/known-agent.js.map +0 -0
  167. package/dist/src/discovery/process-identity.d.ts +0 -0
  168. package/dist/src/discovery/process-identity.d.ts.map +0 -0
  169. package/dist/src/discovery/process-identity.js +0 -0
  170. package/dist/src/discovery/process-identity.js.map +0 -0
  171. package/dist/src/discovery/system-evidence.d.ts +0 -0
  172. package/dist/src/discovery/system-evidence.d.ts.map +0 -0
  173. package/dist/src/discovery/system-evidence.js +0 -0
  174. package/dist/src/discovery/system-evidence.js.map +0 -0
  175. package/dist/src/discovery/types.d.ts +0 -0
  176. package/dist/src/discovery/types.d.ts.map +0 -0
  177. package/dist/src/discovery/types.js +0 -0
  178. package/dist/src/discovery/types.js.map +0 -0
  179. package/dist/src/event-queue.d.ts +0 -0
  180. package/dist/src/event-queue.d.ts.map +0 -0
  181. package/dist/src/event-queue.js +0 -0
  182. package/dist/src/event-queue.js.map +0 -0
  183. package/dist/src/event-spool.d.ts +0 -0
  184. package/dist/src/event-spool.d.ts.map +0 -0
  185. package/dist/src/event-spool.js +0 -0
  186. package/dist/src/event-spool.js.map +0 -0
  187. package/dist/src/generated/phigon/v1/action_pb.d.ts +0 -0
  188. package/dist/src/generated/phigon/v1/action_pb.d.ts.map +1 -1
  189. package/dist/src/generated/phigon/v1/action_pb.js +1 -1
  190. package/dist/src/generated/phigon/v1/action_pb.js.map +1 -1
  191. package/dist/src/generated/phigon/v1/common_pb.d.ts +0 -0
  192. package/dist/src/generated/phigon/v1/common_pb.d.ts.map +1 -1
  193. package/dist/src/generated/phigon/v1/common_pb.js +1 -1
  194. package/dist/src/generated/phigon/v1/common_pb.js.map +1 -1
  195. package/dist/src/generated/phigon/v1/history_sync_pb.d.ts +0 -0
  196. package/dist/src/generated/phigon/v1/history_sync_pb.d.ts.map +1 -1
  197. package/dist/src/generated/phigon/v1/history_sync_pb.js +1 -1
  198. package/dist/src/generated/phigon/v1/history_sync_pb.js.map +1 -1
  199. package/dist/src/generated/phigon/v1/identity_pb.d.ts +0 -0
  200. package/dist/src/generated/phigon/v1/identity_pb.d.ts.map +1 -1
  201. package/dist/src/generated/phigon/v1/identity_pb.js +1 -1
  202. package/dist/src/generated/phigon/v1/identity_pb.js.map +1 -1
  203. package/dist/src/generated/phigon/v1/observer_service_pb.d.ts +0 -0
  204. package/dist/src/generated/phigon/v1/observer_service_pb.d.ts.map +1 -1
  205. package/dist/src/generated/phigon/v1/observer_service_pb.js +1 -1
  206. package/dist/src/generated/phigon/v1/observer_service_pb.js.map +1 -1
  207. package/dist/src/generated/phigon/v1/policy_pb.d.ts +0 -0
  208. package/dist/src/generated/phigon/v1/policy_pb.d.ts.map +1 -1
  209. package/dist/src/generated/phigon/v1/policy_pb.js +1 -1
  210. package/dist/src/generated/phigon/v1/policy_pb.js.map +1 -1
  211. package/dist/src/generated/phigon/v1/supervision_pb.d.ts +0 -0
  212. package/dist/src/generated/phigon/v1/supervision_pb.d.ts.map +1 -1
  213. package/dist/src/generated/phigon/v1/supervision_pb.js +1 -1
  214. package/dist/src/generated/phigon/v1/supervision_pb.js.map +1 -1
  215. package/dist/src/generated/phigon/v1/telemetry_pb.d.ts +0 -0
  216. package/dist/src/generated/phigon/v1/telemetry_pb.d.ts.map +1 -1
  217. package/dist/src/generated/phigon/v1/telemetry_pb.js +1 -1
  218. package/dist/src/generated/phigon/v1/telemetry_pb.js.map +1 -1
  219. package/dist/src/guardian-containment.d.ts +0 -0
  220. package/dist/src/guardian-containment.d.ts.map +0 -0
  221. package/dist/src/guardian-containment.js +0 -0
  222. package/dist/src/guardian-containment.js.map +0 -0
  223. package/dist/src/guardian-decision-journal.d.ts +0 -0
  224. package/dist/src/guardian-decision-journal.d.ts.map +0 -0
  225. package/dist/src/guardian-decision-journal.js +0 -0
  226. package/dist/src/guardian-decision-journal.js.map +0 -0
  227. package/dist/src/guardian-execution-manifest.d.ts +0 -0
  228. package/dist/src/guardian-execution-manifest.d.ts.map +0 -0
  229. package/dist/src/guardian-execution-manifest.js +0 -0
  230. package/dist/src/guardian-execution-manifest.js.map +0 -0
  231. package/dist/src/guardian-hosted-client.d.ts +0 -0
  232. package/dist/src/guardian-hosted-client.d.ts.map +0 -0
  233. package/dist/src/guardian-hosted-client.js +0 -0
  234. package/dist/src/guardian-hosted-client.js.map +0 -0
  235. package/dist/src/guardian-managed-exec.d.ts +0 -0
  236. package/dist/src/guardian-managed-exec.d.ts.map +0 -0
  237. package/dist/src/guardian-managed-exec.js +0 -0
  238. package/dist/src/guardian-managed-exec.js.map +0 -0
  239. package/dist/src/guardian-model-bridge.d.ts +0 -0
  240. package/dist/src/guardian-model-bridge.d.ts.map +0 -0
  241. package/dist/src/guardian-model-bridge.js +0 -0
  242. package/dist/src/guardian-model-bridge.js.map +0 -0
  243. package/dist/src/guardian-native.d.ts +0 -0
  244. package/dist/src/guardian-native.d.ts.map +0 -0
  245. package/dist/src/guardian-native.js +0 -0
  246. package/dist/src/guardian-native.js.map +0 -0
  247. package/dist/src/guardian-process-monitor.d.ts +3 -1
  248. package/dist/src/guardian-process-monitor.d.ts.map +1 -1
  249. package/dist/src/guardian-process-monitor.js +56 -8
  250. package/dist/src/guardian-process-monitor.js.map +1 -1
  251. package/dist/src/health.d.ts +0 -0
  252. package/dist/src/health.d.ts.map +0 -0
  253. package/dist/src/health.js +0 -0
  254. package/dist/src/health.js.map +0 -0
  255. package/dist/src/historical-identity-store.d.ts +0 -0
  256. package/dist/src/historical-identity-store.d.ts.map +0 -0
  257. package/dist/src/historical-identity-store.js +0 -0
  258. package/dist/src/historical-identity-store.js.map +0 -0
  259. package/dist/src/index.d.ts +0 -0
  260. package/dist/src/index.d.ts.map +0 -0
  261. package/dist/src/index.js +0 -0
  262. package/dist/src/index.js.map +0 -0
  263. package/dist/src/installation.d.ts +0 -0
  264. package/dist/src/installation.d.ts.map +0 -0
  265. package/dist/src/installation.js +0 -0
  266. package/dist/src/installation.js.map +0 -0
  267. package/dist/src/machine-command-executor.d.ts +4 -0
  268. package/dist/src/machine-command-executor.d.ts.map +1 -1
  269. package/dist/src/machine-command-executor.js +34 -6
  270. package/dist/src/machine-command-executor.js.map +1 -1
  271. package/dist/src/pair.d.ts +0 -0
  272. package/dist/src/pair.d.ts.map +1 -1
  273. package/dist/src/pair.js +10 -1
  274. package/dist/src/pair.js.map +1 -1
  275. package/dist/src/remove-machine.d.ts +0 -0
  276. package/dist/src/remove-machine.d.ts.map +0 -0
  277. package/dist/src/remove-machine.js +0 -0
  278. package/dist/src/remove-machine.js.map +0 -0
  279. package/dist/src/stream-client.d.ts +3 -1
  280. package/dist/src/stream-client.d.ts.map +1 -1
  281. package/dist/src/stream-client.js +46 -5
  282. package/dist/src/stream-client.js.map +1 -1
  283. package/dist/src/stream-state.d.ts +0 -0
  284. package/dist/src/stream-state.d.ts.map +0 -0
  285. package/dist/src/stream-state.js +0 -0
  286. package/dist/src/stream-state.js.map +0 -0
  287. package/dist/src/update.d.ts +15 -0
  288. package/dist/src/update.d.ts.map +1 -0
  289. package/dist/src/update.js +87 -0
  290. package/dist/src/update.js.map +1 -0
  291. package/dist/src/windows-process.d.ts +0 -0
  292. package/dist/src/windows-process.d.ts.map +0 -0
  293. package/dist/src/windows-process.js +0 -0
  294. package/dist/src/windows-process.js.map +0 -0
  295. package/package.json +83 -78
  296. package/scripts/install.mjs +306 -306
  297. package/scripts/managed-service.mjs +0 -0
  298. package/scripts/verify-guardian-release.mjs +0 -0
  299. package/scripts/windows-app-control.mjs +0 -0
package/README.md CHANGED
@@ -1,303 +1,333 @@
1
- <p align="center">
2
- <a href="https://phigon.online">
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="https://phigon.online/brand/phigon-white.svg" />
5
- <img src="https://phigon.online/brand/phigon-black.svg" alt="Phigon" width="72" />
6
- </picture>
7
- </a>
8
- </p>
9
-
10
- # Phigon Observer
11
-
12
- Connect your AI coding agents to [Phigon](https://phigon.online), the
13
- consent-based supervision workspace for authorized AI activity.
14
-
15
- Phigon helps you see:
16
-
17
- - which approved machines are connected;
18
- - which AI agents are installed or running;
19
- - current activity and agent health;
20
- - saved agent threads and history when sharing is approved.
21
-
22
- Phigon is consent-based. The observer starts with privacy-safe metadata only,
23
- and sensitive activity remains protected unless the machine owner approves it.
24
-
25
- ## Install and connect
26
-
27
- Requires **Node.js 24 or newer** with npm. Releases include Guardian runners for
28
- Windows, macOS, and Linux on x64 and ARM64. Go is not required to install.
29
-
30
- ```sh
31
- npm install --global @phigon/observer
32
- ```
33
-
34
- 1. Sign in to [Phigon](https://phigon.online) and select **Connect machine**.
35
- 2. Choose **Metadata** or **Full activity**, then generate a one-time code.
36
- 3. Run the pairing and monitoring commands shown in the connection dialog on
37
- the machine you administer. The machine owner reviews and accepts the scope.
38
-
39
- For metadata-only monitoring:
40
-
41
- ```sh
42
- phigon-observer pair --code YOUR-CODE --consent-profile metadata
43
- phigon-observer run --profile metadata
44
- ```
45
-
46
- For supported conversations, commands, outputs, and past-history import, select
47
- Full activity in Phigon and use the matching profile:
48
-
49
- ```sh
50
- phigon-observer pair --code YOUR-CODE --consent-profile full
51
- phigon-observer run --profile full
52
- ```
53
-
54
- `YOUR-CODE` is the one-time code from your workspace. Keep the observer process
55
- running for live collection. Closing the dashboard does not stop capture;
56
- stopping the observer does. Full activity still requires matching workspace
57
- policy and local consent, and secrets are redacted before delivery.
58
-
59
- Check installation and connection health with:
60
-
61
- ```sh
62
- phigon-observer doctor --json
63
- ```
64
-
65
- ### Upgrade from the previous npm package
66
-
67
- The maintained package is now **`@phigon/observer`**, published under the
68
- `phigon` npm account. The executable is still **`phigon-observer`**.
69
- The old unscoped package will not automatically switch to the new package.
70
-
71
- Stop your observer process or managed service, then run:
72
-
73
- ```sh
74
- npm uninstall --global phigon-observer
75
- npm install --global @phigon/observer
76
- phigon-observer doctor --json
77
- ```
78
-
79
- Restart with the same collection profile and environment as before. Keep your
80
- existing Phigon data directory: npm package replacement does not require a new
81
- pairing or removal of machine credentials. Managed-service installations may
82
- need their executable path updated to the new global install location. To
83
- update future releases, run `npm install --global @phigon/observer@latest`.
84
-
85
- To monitor an agent that does not have a built-in adapter, register its local
86
- signals once. Definitions are reloaded on every discovery and activity scan:
87
-
88
- ```sh
89
- phigon-observer agent add \
90
- --id release-bot \
91
- --name "Release Bot" \
92
- --executable release-bot \
93
- --process release-bot-worker \
94
- --config-path ~/.release-bot \
95
- --activity-dir ~/.release-bot/sessions
96
- ```
97
-
98
- Use `phigon-observer agent list` to inspect the active definitions and
99
- `phigon-observer agent remove --id release-bot` to stop using one. Custom
100
- activity remains visibly source-isolated unless independent process-lifetime
101
- evidence proves one exact match. Activity directories accept bounded JSONL and
102
- expand `~/` against the current user's home directory. Paths must be absolute
103
- or home-relative, activity roots must be narrowly scoped, and overlapping
104
- identity or activity signals are rejected instead of guessed.
105
-
106
- To disconnect and unregister the paired machine from that machine itself:
107
-
108
- ```sh
109
- phigon-observer remove-machine
110
- ```
111
-
112
- The command requires local confirmation, revokes the machine credential, and
113
- clears it only after the control plane confirms removal. Workspace retention
114
- and administrator-managed historical data deletion remain separate controls.
115
-
116
- Return to [Phigon](https://phigon.online) to view the machine, grouped AI
117
- agents, live status, health, and available history.
118
-
119
- ## Past conversations and live capture
120
-
121
- When a machine owner pairs with Full activity consent and runs with `--profile
122
- full`, the observer automatically imports supported past conversations. It
123
- resumes that import after a restart. Past chats appear directly in Conversations;
124
- new prompts, replies, and tool activity are captured independently in real time.
125
- Administrators can request another archive scan through the authenticated
126
- `POST /v1/machines/{id}/history-syncs` API. A manual scan reports success only
127
- after the server acknowledges its final event. Only permitted, locally redacted
128
- source content is collected; private provider-encrypted reasoning is not decoded.
129
-
130
- The dashboard does not need to stay open. Normal live monitoring and queued
131
- history jobs are driven by the observer process. Local state is limited to
132
- source checkpoints and an encrypted delivery spool; hosted history remains on
133
- the server and duplicate source records are suppressed across retries.
134
-
135
- ## Optional agent actions
136
-
137
- Remote agent actions are disabled on every machine by default. A machine owner
138
- may opt in to the typed Action Center executor before starting the observer:
139
-
140
- ```sh
141
- PHIGON_REMOTE_ACTIONS_ENABLED=true phigon-observer run
142
- ```
143
-
144
- This capability accepts graceful stop and force stop for one exact reported
145
- agent process lifetime. An operator proposal and separate administrator
146
- confirmation are required, commands expire quickly, the observer refreshes
147
- local discovery before signaling, and it persists an idempotent terminal
148
- receipt. This setting does not enable shell commands, file access, screen or
149
- camera capture, or general remote control. Windows graceful stop uses
150
- `taskkill.exe /PID` without the force flag and never silently escalates;
151
- Unix-like systems use `SIGTERM`. Force stop remains a separately approved
152
- capability on every supported platform.
153
-
154
- To additionally enroll this machine for administrator-reviewed system operations,
155
- set `PHIGON_REMOTE_COMMANDS_ENABLED=true` before starting the observer. This
156
- separate capability enables executable/argument commands, current system
157
- inspection, and scheduled shutdown/restart through Actions and Cortex. Commands
158
- run as the observer account, require an exact administrator review, expire before
159
- dispatch, have a 1–120 second limit, and return at most 32 KB of redacted output.
160
- A durable execution journal prevents retrying a previously claimed command after
161
- a crash. A power receipt means a one-minute change was scheduled, not that the
162
- machine already powered off. See [the administration guide](https://github.com/imthegoodboy/Phigon/blob/imp/docs/admin-controls-upgrade.md).
163
-
164
- Managed agent integrations can request the hosted fail-closed Guardian decision
165
- before performing an action:
166
-
167
- ```sh
168
- phigon-observer authorize-action \
169
- --agent codex:worker-1 \
170
- --action command.execute \
171
- --resource "git status" \
172
- --context-file ./phigon-action-context.json \
173
- --json
174
- ```
175
-
176
- The optional context file is bounded JSON with `task_id`, `proposal_id`,
177
- `plan_step_id`, `user_prompt`, `agent_plan`, `justification`,
178
- `expected_effect`, and `recent_activity` fields. These are explicit integration
179
- evidence, not private model chain-of-thought. The gateway
180
- returns exit code 0 only for an allow. A deny, approval requirement, or
181
- unavailable semantic decision returns exit code 77, together with a message
182
- for the agent. A deny or approval also carries the exact authoritative
183
- administrator contract returned by the control plane. Every decision is appended
184
- to the observer's generic activity bridge so normal background telemetry can
185
- store it even when the dashboard is closed.
186
-
187
- For a running agent, integrations should also pass the discovered
188
- `--process-id` and `--process-started-at` together. The control plane binds that
189
- pair to fresh machine inventory before honoring agent-specific scope. Without
190
- that proof it evaluates conservatively across all potentially relevant
191
- agent-scoped contracts; a caller-supplied agent label cannot remove a policy.
192
-
193
- When a semantic contract requires approval, the hosted control plane creates a
194
- durable request bound to the exact policy digest, action, resource, contract,
195
- and evidence envelope. An administrator can approve or reject it in Guardian.
196
- Retrying the unchanged proposal after approval consumes a single-use grant;
197
- another execution requires a new `proposal_id`.
198
-
199
- For CLI agents, run commands through the managed execution boundary so the
200
- same pre-action decision is mandatory and command input, streamed output, and
201
- the final exit are captured by the normal background telemetry pipeline:
202
-
203
- ```sh
204
- phigon-observer guardian exec \
205
- --agent codex:worker-1 \
206
- --context-file ./phigon-action-context.json \
207
- -- npm test
208
- ```
209
-
210
- To govern the agent product and model before it starts, use the managed agent
211
- launcher:
212
-
213
- ```sh
214
- phigon-observer guardian launch \
215
- --agent claude-code:worker-1 \
216
- --model anthropic:claude-sonnet-4-5 \
217
- --context-file ./phigon-action-context.json \
218
- -- claude
219
- ```
220
-
221
- The launcher requires an explicit model claim and obtains one short-lived,
222
- single-use grant covering `agent.start`, `model.use`, and `command.execute`.
223
- The grant binds the executable and input file hashes, arguments, working
224
- directory, environment, and current company policy. The native supervisor
225
- contains the managed process tree and stops it if its online lease cannot renew.
226
- It renews directly with the control plane, so an observer event-loop stall does
227
- not disable policy revocation. Its private credential bootstrap is removed before
228
- the workload starts and is excluded from command arguments and activity journals.
229
- Pending administrator approval holds the complete launch; any denied or
230
- unavailable check prevents it from starting.
231
- `guardian exec` also checks `agent.start` when no model is declared. Before either
232
- launch mode creates its manifest, it retrieves the company's assigned OS profiles.
233
- Linux profiles enforce filesystem permissions and optional denial of all sockets
234
- through Landlock/seccomp; unsupported assigned protections block launch. Profiles
235
- also support Windows/Linux memory, CPU and process limits, runtime deadlines,
236
- and Linux workload UID/GID separation when the required protected launcher and
237
- cgroup are provisioned. macOS currently accepts runtime deadlines only. Profiles
238
- are checked again during grant consumption and online lease renewal. An all-socket
239
- deny profile also blocks the loopback model gateway.
240
-
241
- Compatible agents receive a temporary loopback model gateway credential and
242
- provider base URLs. The hosted gateway checks every forwarded model request,
243
- maps only administrator-approved models, and keeps company provider keys on
244
- the server. Direct provider traffic requires company network controls.
245
-
246
- The executable is launched directly without a shell. A held or blocked action
247
- never starts and returns exit code 77; an allowed command returns its own exit
248
- code. Programs launched outside this managed boundary still require their own
249
- Phigon integration or an operating-system application-control policy. A
250
- business that must prevent direct executable or API bypass also needs OS/MDM
251
- application control and a controlled model-provider proxy.
252
-
253
- Guardian is centrally managed. `phigon-observer guardian status` reports the
254
- management authority. Local on/off and containment switches have been removed;
255
- old `guardian-control.json` files are ignored. Administrator policies alone
256
- specify the allowed intervention, and the executor verifies the exact process
257
- lifetime before stopping it.
258
-
259
- While `phigon-observer run` is active, discovered running process instances are
260
- also submitted for periodic central review, including agents started outside
261
- `guardian launch`. A policy-authorized stop or force-stop is dispatched against
262
- that exact instance and its receipt enters hosted telemetry. Discovery is
263
- post-launch detection: it cannot undo activity before discovery or contain
264
- undetected agents. Block-only policies never become background process kills.
265
-
266
- For exact model/agent lists, central decision auditing, and enterprise rollout
267
- boundaries, see [Guardian runtime](https://github.com/imthegoodboy/Phigon/blob/imp/docs/guardian-runtime.md), the
268
- [business policy catalog](https://github.com/imthegoodboy/Phigon/blob/imp/docs/enterprise-guard-policies.md), and
269
- [deployment requirements](https://github.com/imthegoodboy/Phigon/blob/imp/docs/guardian-deployment.md).
270
- Deployment guidance includes the central Linux profile format and generated
271
- Windows AppLocker build/review/apply/verify/rollback package. Saving a plain-language
272
- rule does not automatically install machine-wide application controls.
273
-
274
- Building from source requires Node 24+ and Go 1.26. `npm run build` produces the
275
- current platform's native runner. `npm run build:platforms` adds Windows, Linux,
276
- and macOS x64/ARM64 binaries before release packaging. Installed releases include
277
- the runner; endpoint users do not need Go.
278
-
279
- Phigon includes optimized support for Codex, Claude Code, Cursor, GitHub
280
- Copilot, OpenCode, Gemini CLI, and more, while the dynamic registry and custom
281
- NDJSON bridge support locally authorized custom agents without a code change.
282
-
283
- ## Troubleshooting
284
-
285
- - **Command not found:** ensure npm's global executable directory is on `PATH`,
286
- then reopen your terminal.
287
- - **Expired pairing code:** generate another code in Connect machine and retry.
288
- - **No conversations:** metadata excludes content. Check the accepted profile,
289
- workspace policy, and adapter coverage with `doctor --profile full --json`.
290
- - **Disconnected machine:** keep the observer running and allow its configured
291
- HTTPS and telemetry endpoints. Already delivered history stays on the server;
292
- queued permitted activity is retried when connectivity returns.
293
- - **Unsupported source:** Phigon shows missing or limited evidence. It does not
294
- fabricate conversations or decrypt provider-private reasoning.
295
-
296
- [Setup guide](https://phigon.online/docs/get-started) ·
297
- [Documentation](https://phigon.online/docs) ·
298
- [Report an issue](https://github.com/imthegoodboy/Phigon/issues)
299
-
300
- ## License
301
-
302
- This package is proprietary (`UNLICENSED`). Public npm availability does not
303
- grant an open-source license.
1
+ <p align="center">
2
+ <a href="https://phigon.online">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://phigon.online/brand/phigon-white.svg" />
5
+ <img src="https://phigon.online/brand/phigon-black.svg" alt="Phigon" width="64" />
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <h1 align="center">Phigon Observer</h1>
11
+
12
+ <p align="center">
13
+ See what AI coding agents do on a computer, with the owner's consent.
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.npmjs.com/package/@phigon/observer"><img alt="npm" src="https://img.shields.io/npm/v/@phigon/observer?color=000000&label=npm"></a>
18
+ <a href="LICENSE"><img alt="License: Apache 2.0" src="https://img.shields.io/badge/license-Apache%202.0-000000"></a>
19
+ <a href="https://github.com/phigonai/observer/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/phigonai/observer/actions/workflows/ci.yml/badge.svg"></a>
20
+ </p>
21
+
22
+ The Phigon Observer runs on a computer where people use AI coding agents such as
23
+ Claude Code, Codex, Cursor and GitHub Copilot. It finds the agents, records what
24
+ they do within the scope the computer's owner approves, removes secrets on the
25
+ machine, and streams the activity to a [Phigon](https://phigon.online)
26
+ workspace. It can also check your company's Guardian rules before an agent runs
27
+ a risky action.
28
+
29
+ It is open source under the [Apache License 2.0](LICENSE), so you can read
30
+ exactly what runs on your computers and what leaves them.
31
+
32
+ - **Consent first.** Nothing is collected until the computer's owner approves
33
+ the exact scope on that machine.
34
+ - **Metadata by default.** The default profile shares which agents run and the
35
+ kind of work they do, not prompts, replies, code or terminal output.
36
+ - **Secrets stay on the machine.** Passwords, tokens and API keys are redacted
37
+ before anything is sent. Local settings can only narrow what is shared.
38
+ - **Survives disconnects.** Activity waits in an encrypted local queue and is
39
+ delivered, in order and without duplicates, when the connection returns.
40
+
41
+ ## Supported agents
42
+
43
+ | | Agent | Detected | Activity and history |
44
+ | --- | --- | --- | --- |
45
+ | <img src="https://phigon.online/agents/claude-code.svg" width="20" alt=""> | Claude Code | Yes | Built in |
46
+ | <img src="https://phigon.online/agents/codex.svg" width="20" alt=""> | OpenAI Codex | Yes | Built in |
47
+ | <img src="https://phigon.online/agents/github-copilot.svg" width="20" alt=""> | GitHub Copilot CLI | Yes | Built in |
48
+ | <img src="https://phigon.online/agents/opencode.svg" width="20" alt=""> | OpenCode | Yes | Built in |
49
+ | <img src="https://phigon.online/agents/openclaw.svg" width="20" alt=""> | OpenClaw | Yes | Built in |
50
+ | <img src="https://phigon.online/agents/hermes.svg" width="20" alt=""> | Hermes Agent | Yes | Built in |
51
+ | <img src="https://phigon.online/agents/cursor.svg" width="20" alt=""> | Cursor Agent | Yes | Bridge |
52
+ | <img src="https://phigon.online/agents/gemini-cli.svg" width="20" alt=""> | Gemini CLI | Yes | Bridge |
53
+ | <img src="https://phigon.online/agents/amp.svg" width="20" alt=""> | Amp | Yes | Bridge |
54
+ | <img src="https://phigon.online/agents/goose.svg" width="20" alt=""> | Goose | Yes | Bridge |
55
+ | <img src="https://phigon.online/agents/cline.svg" width="20" alt=""> | Cline | Yes | Bridge |
56
+ | <img src="https://phigon.online/agents/openhands.svg" width="20" alt=""> | OpenHands | Yes | Bridge |
57
+ | | Aider, Amazon Q Developer CLI, Continue | Yes | Bridge |
58
+ | | Any other agent | [Register it](#custom-agents) | Bridge |
59
+
60
+ *Built in* means the observer reads the agent's own records. *Bridge* means the
61
+ agent (or a small wrapper) pipes NDJSON to `phigon-observer ingest`.
62
+
63
+ ## How it works
64
+
65
+ ```
66
+ Your computer Phigon workspace
67
+ ┌──────────────────────────────────────────┐ ┌─────────────────────────┐
68
+ │ AI agents (Claude Code, Codex, ...) │ │ Control plane │
69
+ │ │ their own records and processes │ │ history and search │
70
+ │ ▼ │ TLS │ Guardian rules │
71
+ │ phigon-observer │ ────► │ the Phigon app │
72
+ │ discover → collect → redact │ gRPC └─────────────────────────┘
73
+ │ → encrypted queue → stream │
74
+ │ │
75
+ │ Guardian runner (managed launches) │
76
+ └──────────────────────────────────────────┘
77
+ ```
78
+
79
+ The observer never needs inbound connections. It talks to the control plane
80
+ over HTTPS for pairing and over a single authenticated gRPC stream for
81
+ telemetry. The wire protocol is in [`proto/`](proto).
82
+
83
+ ## Quick start
84
+
85
+ You need **Node.js 24 or newer** and a Phigon workspace. Installed releases
86
+ include the Guardian runner for Windows, macOS and Linux on x64 and Arm64; Go is
87
+ only needed to build from source.
88
+
89
+ ```sh
90
+ npm install --global @phigon/observer
91
+ ```
92
+
93
+ 1. In the Phigon app, choose **Connect machine**.
94
+ 2. Choose **Metadata** or **Full activity**, then generate a one-time code.
95
+ 3. On the computer, run the two commands the dialog shows. The computer's owner
96
+ reviews and accepts the scope.
97
+
98
+ Metadata only:
99
+
100
+ ```sh
101
+ phigon-observer pair --code YOUR-CODE --consent-profile metadata
102
+ phigon-observer run --profile metadata
103
+ ```
104
+
105
+ Full activity (supported conversations, commands, outputs and past history):
106
+
107
+ ```sh
108
+ phigon-observer pair --code YOUR-CODE --consent-profile full
109
+ phigon-observer run --profile full
110
+ ```
111
+
112
+ Keep `phigon-observer run` running for live collection; closing the Phigon app
113
+ does not stop it. Check the installation and connection at any time:
114
+
115
+ ```sh
116
+ phigon-observer doctor --json
117
+ ```
118
+
119
+ ## What is collected
120
+
121
+ What the observer sends is always the overlap of your workspace's policy and
122
+ the profile the computer's owner accepted.
123
+
124
+ | | Metadata (default) | Full activity |
125
+ | --- | --- | --- |
126
+ | Which agents are installed and running | Yes | Yes |
127
+ | Agent state, health and kind of activity | Yes | Yes |
128
+ | Prompts and replies | No | Supported agents |
129
+ | Commands, tool calls and their output | No | Supported agents, redacted |
130
+ | Past conversations | No | Imported once, then live |
131
+ | Passwords, tokens and API keys | Never | Never (redacted on the machine) |
132
+ | Provider-encrypted model reasoning | Never | Never decoded |
133
+
134
+ Individual categories can be narrowed further with `PHIGON_COLLECT_*`
135
+ settings. A full description is in
136
+ [privacy and security](https://phigon.online/docs/privacy-and-security/).
137
+
138
+ ## Commands
139
+
140
+ | Command | What it does |
141
+ | --- | --- |
142
+ | `pair --code <code> --consent-profile <metadata\|full>` | Connects this computer to a workspace after local consent. |
143
+ | `run [--profile <metadata\|full>]` | Discovers agents and streams permitted activity. |
144
+ | `doctor [--profile <...>] [--json]` | Checks the setup without sending any data. |
145
+ | `discover [--json]` | Prints a one-time, sanitized inventory of local agents. |
146
+ | `agent add \| list \| remove` | Manages custom agent definitions. |
147
+ | `ingest --agent <id\|custom> [--name <name>]` | Reads NDJSON activity from stdin (bridges). |
148
+ | `guardian status \| exec \| launch` | Guardian checks and managed execution. |
149
+ | `authorize-action --action <a> --resource <r>` | Asks Guardian whether one action may run. |
150
+ | `update [--check] [--yes]` | Checks for or installs a new release. |
151
+ | `remove-machine` | Unregisters this computer and revokes its credential. |
152
+
153
+ Run `phigon-observer help` for every flag.
154
+
155
+ ## Configuration
156
+
157
+ Settings are environment variables. The most common ones:
158
+
159
+ | Variable | Purpose |
160
+ | --- | --- |
161
+ | `PHIGON_DATA_DIR` | Where the credential, checkpoints and encrypted queue live. Use a separate directory per workspace. |
162
+ | `PHIGON_CONTROL_PLANE_URL`, `PHIGON_GRPC_URL` | Endpoints for a self-hosted workspace. Pairing saves them; the stream refuses to send credentials anywhere else. |
163
+ | `PHIGON_TLS_CA_FILE` | A private certificate authority for gRPC. Use `NODE_EXTRA_CA_CERTS` for HTTPS. |
164
+ | `PHIGON_TLS_CLIENT_CERT_FILE`, `PHIGON_TLS_CLIENT_KEY_FILE` | Client certificate, when the workspace requires mutual TLS. |
165
+ | `PHIGON_COLLECT_*` | Turns individual content categories off (or on, within the workspace policy). |
166
+ | `PHIGON_REDACT_PATH_PATTERNS` | Extra file path patterns to redact. |
167
+ | `PHIGON_<AGENT>_ACTIVITY_DIRS` | Extra record folders for an agent, e.g. `PHIGON_CLAUDE_ACTIVITY_DIRS`. |
168
+ | `PHIGON_REMOTE_ACTIONS_ENABLED` | Opt in to administrator-approved agent stop and force stop. Off by default. |
169
+ | `PHIGON_REMOTE_COMMANDS_ENABLED` | Opt in to administrator-reviewed system operations. Off by default. |
170
+ | `PHIGON_UPDATE_CHECK` | Set to `false` to turn off the once-a-day update check. |
171
+ | `PHIGON_LOG_LEVEL` | Logging detail. |
172
+
173
+ Never disable certificate verification. Interactive `pair` and `run` sessions
174
+ check npm for a new release at most once a day and ask before updating;
175
+ background services and `--json` commands never prompt or update on their own.
176
+
177
+ ## Custom agents
178
+
179
+ To monitor an agent without a built-in adapter, register its local signals once:
180
+
181
+ ```sh
182
+ phigon-observer agent add \
183
+ --id release-bot \
184
+ --name "Release Bot" \
185
+ --executable release-bot \
186
+ --process release-bot-worker \
187
+ --config-path ~/.release-bot \
188
+ --activity-dir ~/.release-bot/sessions
189
+ ```
190
+
191
+ Definitions are reloaded on every scan. `agent list` shows them and
192
+ `agent remove --id release-bot` stops using one. Activity directories accept
193
+ bounded JSONL; paths must be absolute or start with `~/`, roots must be narrow,
194
+ and overlapping signals are rejected instead of guessed. Custom activity stays
195
+ labeled by its source unless independent process evidence proves an exact
196
+ match.
197
+
198
+ ## Optional agent actions
199
+
200
+ Remote actions are off on every computer by default.
201
+
202
+ - `PHIGON_REMOTE_ACTIONS_ENABLED=true` lets administrators stop or force-stop
203
+ one exact running agent process. Each stop needs an operator proposal and a
204
+ separate administrator confirmation, expires quickly, and leaves a receipt.
205
+ Graceful stop uses `taskkill /PID` on Windows and `SIGTERM` elsewhere; force
206
+ stop is approved separately. It does not enable shell access, file access,
207
+ screen capture or general remote control.
208
+ - `PHIGON_REMOTE_COMMANDS_ENABLED=true` additionally allows
209
+ administrator-reviewed commands (executable and arguments, no shell), system
210
+ inspection, and scheduled shutdown or restart. Commands run as the observer's
211
+ account, are limited to 1–120 seconds and return at most 32 KB of redacted
212
+ output. A durable journal prevents a command from running twice after a crash.
213
+
214
+ ## Guardian: checks before an agent acts
215
+
216
+ Guardian rules are set centrally by your administrators; the observer has no
217
+ local on/off switch. Three integration points are available.
218
+
219
+ **Ask before one action.** Returns exit code `0` only when the action is
220
+ allowed; a denial, a required approval or an unavailable decision returns `77`
221
+ with a message for the agent:
222
+
223
+ ```sh
224
+ phigon-observer authorize-action \
225
+ --agent codex:worker-1 \
226
+ --action command.execute \
227
+ --resource "git status" \
228
+ --context-file ./phigon-action-context.json \
229
+ --json
230
+ ```
231
+
232
+ The optional context file holds bounded `task_id`, `proposal_id`,
233
+ `plan_step_id`, `user_prompt`, `agent_plan`, `justification`,
234
+ `expected_effect` and `recent_activity` fields. Pass `--process-id` and
235
+ `--process-started-at` for a running agent so the decision is bound to that
236
+ exact process.
237
+
238
+ **Run a command through Guardian.** The check is mandatory, and the input,
239
+ output and exit code are recorded:
240
+
241
+ ```sh
242
+ phigon-observer guardian exec --agent codex:worker-1 -- npm test
243
+ ```
244
+
245
+ **Launch an agent through Guardian.** One short-lived grant covers starting the
246
+ agent, using the declared model and running the command. The Guardian runner
247
+ contains the process tree, renews its lease directly with the control plane and
248
+ stops the agent if the lease is revoked:
249
+
250
+ ```sh
251
+ phigon-observer guardian launch \
252
+ --agent claude-code:worker-1 \
253
+ --model anthropic:claude-sonnet-4-5 \
254
+ -- claude
255
+ ```
256
+
257
+ Assigned OS profiles are enforced at launch: on Linux, filesystem and network
258
+ rules through Landlock and seccomp, plus memory, CPU and process limits and
259
+ separate workload users when a cgroup is provisioned; on Windows, memory, CPU
260
+ and process limits; on macOS, runtime deadlines. Compatible agents receive a
261
+ temporary loopback model gateway, so company provider keys stay on the server.
262
+
263
+ While `run` is active, running agents are also reviewed periodically, including
264
+ ones started outside `guardian launch`. Discovery happens after launch, so it
265
+ cannot undo earlier activity. A company that must prevent bypass also needs
266
+ operating-system application control and a controlled model provider proxy.
267
+
268
+ ## Troubleshooting
269
+
270
+ - **Command not found:** put npm's global bin directory on `PATH` and reopen
271
+ the terminal.
272
+ - **Expired pairing code:** generate a new one in **Connect machine**.
273
+ - **No conversations:** the metadata profile excludes content. Check with
274
+ `phigon-observer doctor --profile full --json`.
275
+ - **Disconnected:** keep `run` running and allow its HTTPS and gRPC endpoints.
276
+ Queued activity is delivered when the connection returns.
277
+ - **Older self-hosted pairing without a saved stream endpoint:** pass
278
+ `run --grpc-url https://stream.your-company.example` or set `PHIGON_GRPC_URL`.
279
+ - **Unreadable pairing data:** keep the data directory and encrypted queue, and
280
+ restore the credential file from a trusted backup. Never paste it into a
281
+ support message.
282
+
283
+ More help: [setup guide](https://phigon.online/docs/get-started/),
284
+ [documentation](https://phigon.online/docs/) and
285
+ [troubleshooting](https://phigon.online/docs/troubleshooting/).
286
+
287
+ ## Building from source
288
+
289
+ You need Node.js 24+ and Go 1.26+.
290
+
291
+ ```sh
292
+ npm ci
293
+ npm run build # TypeScript and the Guardian runner for this platform
294
+ npm run check # lint, type check and tests
295
+ npm run build:platforms # Guardian runners for every platform, for releases
296
+ cd go && go test ./... # Go tests
297
+ ```
298
+
299
+ After changing the protocol in `proto/`, regenerate the code with
300
+ [Buf](https://buf.build) and record the new checksums:
301
+
302
+ ```sh
303
+ buf generate
304
+ sh scripts/check-generated.sh
305
+ ```
306
+
307
+ ### Repository layout
308
+
309
+ | Path | Contents |
310
+ | --- | --- |
311
+ | `src/` | The observer CLI (TypeScript): discovery, activity adapters, redaction, pairing, the stream client and Guardian integration. |
312
+ | `test/` | Tests for the CLI. |
313
+ | `go/` | Go module `github.com/phigonai/observer/go`: the Guardian runner, the Linux supervisor, OS sandbox profiles, and the generated protocol code. |
314
+ | `proto/` | The wire protocol between the observer and a Phigon control plane. |
315
+ | `scripts/` | Build, install and release helpers. |
316
+
317
+ ## Contributing
318
+
319
+ Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) first. This
320
+ repository is published from Phigon's main repository; a maintainer applies
321
+ accepted pull requests there, keeping you as the author, and they appear here
322
+ automatically.
323
+
324
+ ## Security
325
+
326
+ Please report vulnerabilities privately. See [SECURITY.md](SECURITY.md).
327
+
328
+ ## License
329
+
330
+ Licensed under the [Apache License, Version 2.0](LICENSE). See [NOTICE](NOTICE)
331
+ and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). The Phigon name and logo
332
+ are trademarks and are not covered by the license; see
333
+ [TRADEMARKS.md](TRADEMARKS.md).