@agimon-ai/po-task 0.0.0-alpha.2 → 0.0.0-alpha.21

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 (106) hide show
  1. package/LICENSE +149 -21
  2. package/README.md +10 -10
  3. package/dist/apiContracts.cjs +1 -1
  4. package/dist/apiContracts.cjs.map +1 -1
  5. package/dist/apiContracts.d.mts +18 -18
  6. package/dist/apiContracts.mjs +1 -1
  7. package/dist/apiContracts.mjs.map +1 -1
  8. package/dist/{config-CdX-Bv8q.cjs → config-BC-bztyx.cjs} +8 -8
  9. package/dist/config-BC-bztyx.cjs.map +1 -0
  10. package/dist/{config-CFSs3iku.mjs → config-BTadoGeF.mjs} +8 -8
  11. package/dist/config-BTadoGeF.mjs.map +1 -0
  12. package/dist/config.cjs +1 -1
  13. package/dist/config.d.mts +1 -1
  14. package/dist/config.mjs +1 -2
  15. package/dist/{delegation-CdMqOZB4.mjs → delegation-Dsqf7fUM.mjs} +11 -11
  16. package/dist/delegation-Dsqf7fUM.mjs.map +1 -0
  17. package/dist/{delegation-DsnKjMbJ.cjs → delegation-frvEXhIz.cjs} +10 -10
  18. package/dist/delegation-frvEXhIz.cjs.map +1 -0
  19. package/dist/delegationManager.cjs +1 -1
  20. package/dist/delegationManager.d.mts +1 -1
  21. package/dist/delegationManager.mjs +1 -1
  22. package/dist/extensions/mcp-ui.mjs.map +1 -1
  23. package/dist/extensions/mcp.cjs +23 -23
  24. package/dist/extensions/mcp.cjs.map +1 -1
  25. package/dist/extensions/mcp.d.mts +1 -1
  26. package/dist/extensions/mcp.mjs +23 -23
  27. package/dist/extensions/mcp.mjs.map +1 -1
  28. package/dist/extensions/native.mjs +14 -0
  29. package/dist/extensions/native.mjs.map +1 -1
  30. package/dist/extensions/server.cjs +92 -32
  31. package/dist/extensions/server.cjs.map +1 -1
  32. package/dist/extensions/server.d.mts +2 -2
  33. package/dist/extensions/server.d.mts.map +1 -1
  34. package/dist/extensions/server.mjs +96 -36
  35. package/dist/extensions/server.mjs.map +1 -1
  36. package/dist/extensions/web.mjs +28 -28
  37. package/dist/extensions/web.mjs.map +1 -1
  38. package/dist/{index-teIf67qQ.d.mts → index-B9QNwUBr.d.mts} +8 -8
  39. package/dist/{index-teIf67qQ.d.mts.map → index-B9QNwUBr.d.mts.map} +1 -1
  40. package/dist/{index-B-3sCF2S.d.mts → index-BsZ8DxpJ.d.mts} +7 -7
  41. package/dist/{index-B-3sCF2S.d.mts.map → index-BsZ8DxpJ.d.mts.map} +1 -1
  42. package/dist/{index-XY9VPmfm.d.mts → index-CA4Opp4r.d.mts} +2 -2
  43. package/dist/{index-XY9VPmfm.d.mts.map → index-CA4Opp4r.d.mts.map} +1 -1
  44. package/dist/{index-Dvb8X_qB.d.mts → index-qQGWsPum.d.mts} +2 -2
  45. package/dist/index-qQGWsPum.d.mts.map +1 -0
  46. package/dist/index.cjs +4 -4
  47. package/dist/index.d.mts +5 -5
  48. package/dist/index.mjs +4 -4
  49. package/dist/{logSinkTelemetry-B23qGiP-.cjs → logSinkTelemetry-BGb8WQBz.cjs} +4 -4
  50. package/dist/logSinkTelemetry-BGb8WQBz.cjs.map +1 -0
  51. package/dist/{logSinkTelemetry-BMBsC54p.mjs → logSinkTelemetry-BhbKdn-x.mjs} +5 -5
  52. package/dist/logSinkTelemetry-BhbKdn-x.mjs.map +1 -0
  53. package/dist/logSinkTelemetry.cjs +2 -2
  54. package/dist/logSinkTelemetry.d.mts +3 -3
  55. package/dist/logSinkTelemetry.mjs +2 -2
  56. package/dist/{paths-Cah1vFGv.mjs → paths-DajceJig.mjs} +4 -4
  57. package/dist/paths-DajceJig.mjs.map +1 -0
  58. package/dist/{paths-CSya2l9_.cjs → paths-P-XvOUuH.cjs} +4 -4
  59. package/dist/paths-P-XvOUuH.cjs.map +1 -0
  60. package/dist/storeInvariants.mjs +1 -2
  61. package/dist/storePaths.cjs +1 -1
  62. package/dist/storePaths.d.mts +1 -1
  63. package/dist/storePaths.mjs +1 -2
  64. package/dist/storeProcessLiveness.mjs +1 -2
  65. package/dist/storeReconcile.mjs +1 -2
  66. package/dist/storeReducer.mjs +1 -2
  67. package/dist/storeTaskGraph.mjs +1 -2
  68. package/dist/storeTaskStore.cjs +1 -1
  69. package/dist/storeTaskStore.d.mts +1 -1
  70. package/dist/storeTaskStore.mjs +1 -2
  71. package/dist/storeTypes.mjs +1 -2
  72. package/dist/{task-Dhta7JyA.d.mts → task-4HeGAS8o.d.mts} +6 -6
  73. package/dist/{task-Dhta7JyA.d.mts.map → task-4HeGAS8o.d.mts.map} +1 -1
  74. package/dist/{taskStore-pAJ971Ml.mjs → taskStore-BAi54FKL.mjs} +4 -4
  75. package/dist/{taskStore-pAJ971Ml.mjs.map → taskStore-BAi54FKL.mjs.map} +1 -1
  76. package/dist/{taskStore-DjU60rMm.cjs → taskStore-C4vcUOzA.cjs} +4 -4
  77. package/dist/{taskStore-DjU60rMm.cjs.map → taskStore-C4vcUOzA.cjs.map} +1 -1
  78. package/dist/telemetry-DYfgUFF8.d.mts +35 -0
  79. package/dist/telemetry-DYfgUFF8.d.mts.map +1 -0
  80. package/dist/telemetry-gEGWTaMI.mjs +25 -0
  81. package/dist/telemetry-gEGWTaMI.mjs.map +1 -0
  82. package/dist/telemetry-x3JxCA5K.cjs +30 -0
  83. package/dist/telemetry-x3JxCA5K.cjs.map +1 -0
  84. package/dist/toolPromptGuidelines.cjs +1 -1
  85. package/dist/toolPromptGuidelines.cjs.map +1 -1
  86. package/dist/toolPromptGuidelines.mjs +1 -1
  87. package/dist/toolPromptGuidelines.mjs.map +1 -1
  88. package/dist/toolResponseEnvelope.mjs +1 -2
  89. package/dist/toolSchema.d.mts +1 -1
  90. package/dist/toolSchema.mjs +1 -2
  91. package/package.json +20 -19
  92. package/dist/config-CFSs3iku.mjs.map +0 -1
  93. package/dist/config-CdX-Bv8q.cjs.map +0 -1
  94. package/dist/delegation-CdMqOZB4.mjs.map +0 -1
  95. package/dist/delegation-DsnKjMbJ.cjs.map +0 -1
  96. package/dist/index-Dvb8X_qB.d.mts.map +0 -1
  97. package/dist/logSinkTelemetry-B23qGiP-.cjs.map +0 -1
  98. package/dist/logSinkTelemetry-BMBsC54p.mjs.map +0 -1
  99. package/dist/paths-CSya2l9_.cjs.map +0 -1
  100. package/dist/paths-Cah1vFGv.mjs.map +0 -1
  101. package/dist/telemetry-Ca0I3Tqo.cjs +0 -30
  102. package/dist/telemetry-Ca0I3Tqo.cjs.map +0 -1
  103. package/dist/telemetry-DyS44zAD.mjs +0 -25
  104. package/dist/telemetry-DyS44zAD.mjs.map +0 -1
  105. package/dist/telemetry-FMGRovb4.d.mts +0 -35
  106. package/dist/telemetry-FMGRovb4.d.mts.map +0 -1
package/LICENSE CHANGED
@@ -1,21 +1,149 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Vuong Ngo
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
2
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
3
+
4
+ Parameters
5
+
6
+ Licensor: Agimon Pty Ltd
7
+ Licensed Work: Po, the software in the Po source repository and the
8
+ packages released from it, in each version released by
9
+ the Licensor.
10
+ The Licensed Work is (c) 2026 Agimon Pty Ltd.
11
+ Material identified as third-party in the "Third-party
12
+ components" section at the end of this file or in a
13
+ NOTICE file, and any package or directory whose own
14
+ license file grants a different license, is not part of
15
+ the Licensed Work and remains under its own license.
16
+ Additional Use Grant: You may make production use of the Licensed Work if
17
+ your use is Eligible Use. "Eligible Use" is production use that falls
18
+ within at least one of the following:
19
+
20
+ (a) Personal Use. Use by an individual for their own personal purposes,
21
+ and not on behalf of, or for the benefit of, an employer, client, or
22
+ other Organization. Use by an individual in the course of employment
23
+ or engagement by an Organization is use by that Organization.
24
+
25
+ (b) Small Organization Use. Use by or on behalf of an Organization whose
26
+ Annual Revenue is less than USD 1,000,000.
27
+
28
+ (c) Non-profit, Education and Research Use. Use, regardless of Annual
29
+ Revenue, by (i) an Organization registered or recognized as a
30
+ non-profit or charitable organization under the laws of its
31
+ jurisdiction, for its non-profit purposes; (ii) an accredited school,
32
+ college, or university, for teaching, learning, or academic research;
33
+ or (iii) a publicly funded research institution, for its research.
34
+
35
+ (d) Service Provider Use. Use by a consultant, contractor, agency, or other
36
+ service provider, regardless of its own Annual Revenue, solely to
37
+ build, deploy, host, operate, or support the Licensed Work for a client
38
+ whose own use would be Eligible Use under (a), (b), or (c). A service
39
+ provider's use for its own purposes is Eligible Use only if the service
40
+ provider itself qualifies under (b) or (c).
41
+
42
+
43
+ Hosted services. Offering the Licensed Work to third parties as a hosted
44
+ or managed service whose primary value is the Licensed Work is Eligible
45
+ Use only if each such third party's own use would be Eligible Use.
46
+
47
+ Definitions. "Organization" means any company, partnership, sole
48
+ proprietorship, trust, association, government body, or other entity, and
49
+ includes an individual acting in a business or professional capacity.
50
+ "Affiliate" means any entity that directly or indirectly controls, is
51
+ controlled by, or is under common control with an Organization, where
52
+ "control" means ownership of more than 50% of the voting interests of an
53
+ entity or the power to direct its management and policies by contract or
54
+ otherwise. "Annual Revenue" means the total gross revenue of an
55
+ Organization and all of its Affiliates combined, from all sources and
56
+ whether or not related to the Licensed Work, for its most recently
57
+ completed fiscal year, or, if it has not completed a fiscal year, for the
58
+ twelve months before the use (or since its formation, if shorter),
59
+ converted into US dollars at the average exchange rate for that period.
60
+ Proceeds of equity or debt financing are not revenue.
61
+
62
+ Threshold. If an Organization stops qualifying under (b), its existing
63
+ production use remains Eligible Use for 90 days after it stops
64
+ qualifying, after which it must obtain a commercial license or stop
65
+ production use. Use that was Eligible Use when it occurred never requires
66
+ a commercial license after the fact.
67
+ Change Date: Four years from the date a version of the Licensed Work
68
+ is first publicly released by the Licensor.
69
+ Change License: Apache License, Version 2.0
70
+
71
+ For information about alternative licensing arrangements for the Licensed
72
+ Work, please visit: https://agimon.ai/licensing
73
+
74
+ Notice
75
+
76
+ The Business Source License (this document, or the "License") is not an Open
77
+ Source license. However, the Licensed Work will eventually be made available
78
+ under an Open Source License, as stated in this License.
79
+
80
+ -----------------------------------------------------------------------------
81
+
82
+ Business Source License 1.1
83
+
84
+ Terms
85
+
86
+ The Licensor hereby grants you the right to copy, modify, create derivative
87
+ works, redistribute, and make non-production use of the Licensed Work. The
88
+ Licensor may make an Additional Use Grant, above, permitting limited
89
+ production use.
90
+
91
+ Effective on the Change Date, or the fourth anniversary of the first publicly
92
+ available distribution of a specific version of the Licensed Work under this
93
+ License, whichever comes first, the Licensor hereby grants you rights under
94
+ the terms of the Change License, and the rights granted in the paragraph
95
+ above terminate.
96
+
97
+ If your use of the Licensed Work does not comply with the requirements
98
+ currently in effect as described in this License, you must purchase a
99
+ commercial license from the Licensor, its affiliated entities, or authorized
100
+ resellers, or you must refrain from using the Licensed Work.
101
+
102
+ All copies of the original and modified Licensed Work, and derivative works
103
+ of the Licensed Work, are subject to this License. This License applies
104
+ separately for each version of the Licensed Work and the Change Date may vary
105
+ for each version of the Licensed Work released by Licensor.
106
+
107
+ You must conspicuously display this License on each original or modified copy
108
+ of the Licensed Work. If you receive the Licensed Work in original or
109
+ modified form from a third party, the terms and conditions set forth in this
110
+ License apply to your use of that work.
111
+
112
+ Any use of the Licensed Work in violation of this License will automatically
113
+ terminate your rights under this License for the current and all other
114
+ versions of the Licensed Work.
115
+
116
+ This License does not grant you any right in any trademark or logo of
117
+ Licensor or its affiliates (provided that you may use a trademark or logo of
118
+ Licensor as expressly required by this License).
119
+
120
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
121
+ AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
122
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
123
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
124
+ TITLE.
125
+
126
+ MariaDB hereby grants you permission to use this License’s text to license
127
+ your works, and to refer to it using the trademark “Business Source License”,
128
+ as long as you comply with the Covenants of Licensor below.
129
+
130
+ Covenants of Licensor
131
+
132
+ In consideration of the right to use this License’s text and the “Business
133
+ Source License” name and trademark, Licensor covenants to MariaDB, and to all
134
+ other recipients of the licensed work to be provided by Licensor:
135
+
136
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
137
+ or a license that is compatible with GPL Version 2.0 or a later version,
138
+ where “compatible” means that software provided under the Change License can
139
+ be included in a program with software provided under GPL Version 2.0 or a
140
+ later version. Licensor may specify additional Change Licenses without
141
+ limitation.
142
+
143
+ 2. To either: (a) specify an additional grant of rights to use that does not
144
+ impose any additional restriction on the right granted in this License, as
145
+ the Additional Use Grant; or (b) insert the text “None”.
146
+
147
+ 3. To specify a Change Date.
148
+
149
+ 4. Not to modify this License in any other way.
package/README.md CHANGED
@@ -72,7 +72,7 @@ The browser owns the task view and renderer. Terminal task shortcuts and overlay
72
72
  The default session-tree store is:
73
73
 
74
74
  ```text
75
- ~/.po/agent/doom-task/<session>/tasks.json
75
+ ~/.po/agent/po-task/<session>/tasks.json
76
76
  ```
77
77
 
78
78
  Task is authoritative across transcript compaction because the graph is file-backed. This does not
@@ -80,12 +80,12 @@ mean Task persists Team membership, intercom, or child-process state.
80
80
 
81
81
  Defaults and overrides:
82
82
 
83
- | Setting | Default | Purpose |
84
- | --------------------------------- | ---------- | ------------------------------------------ |
85
- | `DOOM_TASK_MAX_TASKS` | `15` | Maximum non-deleted tasks |
86
- | `DOOM_TASK_STORE_TTL_MS` | 30 days | Retention for inactive session-tree stores |
87
- | `DOOM_TASK_DELEGATION_TIMEOUT_MS` | 20 minutes | Delegated-run result timeout |
88
- | `DOOM_TASK_STORE` | Unset | Override the complete store file path |
83
+ | Setting | Default | Purpose |
84
+ | ------------------------------- | ---------- | ------------------------------------------ |
85
+ | `PO_TASK_MAX_TASKS` | `15` | Maximum non-deleted tasks |
86
+ | `PO_TASK_STORE_TTL_MS` | 30 days | Retention for inactive session-tree stores |
87
+ | `PO_TASK_DELEGATION_TIMEOUT_MS` | 20 minutes | Delegated-run result timeout |
88
+ | `PO_TASK_STORE` | Unset | Override the complete store file path |
89
89
 
90
90
  Startup reconciliation removes expired stores and repairs delegation records whose owning process
91
91
  is no longer live.
@@ -93,7 +93,7 @@ is no longer live.
93
93
  ## Task and Team together
94
94
 
95
95
  Task uses Team's delegation service and records its lifecycle events on the task. It also contributes
96
- pending assignments through `doom/background-work`. Team discovers the selected agent, applies
96
+ pending assignments through `po/background-work`. Team discovers the selected agent, applies
97
97
  model and tool policy, owns the run, and returns completion or failure. If Team unloads or is
98
98
  replaced, both connections are removed and rebound without leaving a process-global registration.
99
99
  Intercom and Team membership remain Team state; `tasks.json` remains Task state.
@@ -105,7 +105,7 @@ import { detectCycle, isBlocked, TaskStore } from '@agimon-ai/po-task';
105
105
  import type { Task, TaskStatus } from '@agimon-ai/po-task';
106
106
  ```
107
107
 
108
- Focused subpaths include `/toolSchema`, `/storeReducer`, `/storeTaskStore`, and `/delegationManager`. Native metadata selects server, browser, and explicit MCP facets; terminal facades are removed.
108
+ Focused subpaths include `/toolSchema`, `/storeReducer`, `/storeTaskStore`, and `/delegationManager`. Native metadata selects server and browser plugins and explicit MCP facets; terminal facades are removed.
109
109
 
110
110
  ## Source layout
111
111
 
@@ -126,6 +126,6 @@ Maintained by [Agimon](https://agimon.ai/about).
126
126
 
127
127
  ## License
128
128
 
129
- MIT
129
+ Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
130
130
 
131
131
  Native server routes live in `src/extensions`; browser routes own presentation. Services own persistence, delegation, and configuration, while models hold durable task documents and graphs. Public entries are flat, forwarding-only files in `src/exports`. Scope lifecycle cleanup belongs to the native server root, not a Pi factory. Terminal task overlays and their public facades are retired.
@@ -39,7 +39,7 @@ const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
39
39
  sockets: ["global", "workspace"].map((scope) => ({
40
40
  id: "tasks.channel",
41
41
  scope,
42
- service: "po.hub.v1",
42
+ service: "po.hub",
43
43
  member: "task_graph",
44
44
  kind: "channel",
45
45
  direction: "server-to-client",
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'po.hub.v1',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqBA,QAAAA,KAAK,OAAO;CAC5C,OAAOA,QAAAA,KAAK,MACVA,QAAAA,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAWA,QAAAA,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAEA,QAAAA,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,gBAAA,GAAeC,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
1
+ {"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'po.hub',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqBA,QAAAA,KAAK,OAAO;CAC5C,OAAOA,QAAAA,KAAK,MACVA,QAAAA,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAWA,QAAAA,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAEA,QAAAA,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,gBAAA,GAAeC,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
@@ -1,52 +1,52 @@
1
1
  import { Type } from "typebox";
2
2
  //#region src/schemas/apiContracts.d.ts
3
3
  export declare const apiContracts: {
4
- version: 1;
5
4
  protocols?: Record<string, string> | undefined;
6
5
  schemas?: Record<string, boolean | object> | undefined;
6
+ gaps?: string[] | undefined;
7
+ version: 1;
7
8
  http: {
8
- id: string;
9
- scope: "global" | "session" | "workspace";
10
9
  basePath?: string | undefined;
11
- path: string;
12
- method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
13
- description: string;
14
10
  availability?: string | undefined;
15
- authentication: "device" | "none" | "owner";
16
11
  parameters?: {
17
- name: string;
18
- in: "header" | "path" | "query";
19
12
  required: boolean;
13
+ name: string;
14
+ in: "path" | "query" | "header";
20
15
  schema: boolean | object;
21
16
  }[] | undefined;
22
17
  body?: {
23
- contentType: string;
24
18
  contentTypes?: string[] | undefined;
25
19
  required: boolean;
26
20
  schema: boolean | object;
21
+ contentType: string;
27
22
  } | undefined;
23
+ id: string;
24
+ description: string;
25
+ scope: "global" | "workspace" | "session";
26
+ path: string;
27
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
28
+ authentication: "owner" | "none" | "device";
28
29
  responses: Record<string, {
29
- description: string;
30
- contentType?: string | undefined;
31
30
  schema?: boolean | object | undefined;
31
+ contentType?: string | undefined;
32
32
  events?: Record<string, boolean | object> | undefined;
33
+ description: string;
33
34
  }>;
34
35
  }[];
35
36
  sockets: {
37
+ availability?: string | undefined;
38
+ output?: boolean | object | undefined;
39
+ errors?: boolean | object | undefined;
36
40
  id: string;
37
- scope: "global" | "session" | "workspace";
38
41
  description: string;
39
- availability?: string | undefined;
42
+ scope: "global" | "workspace" | "session";
40
43
  service: string;
41
44
  member: string;
42
45
  direction: "client-to-server" | "server-to-client";
43
- kind: "channel" | "method" | "state";
46
+ kind: "state" | "method" | "channel";
44
47
  input: boolean | object;
45
- output?: boolean | object | undefined;
46
- errors?: boolean | object | undefined;
47
48
  }[];
48
49
  dynamic: string[];
49
- gaps?: string[] | undefined;
50
50
  };
51
51
  //#endregion
52
52
  export { apiContracts as default };
@@ -35,7 +35,7 @@ const apiContracts = defineApiContract({
35
35
  sockets: ["global", "workspace"].map((scope) => ({
36
36
  id: "tasks.channel",
37
37
  scope,
38
- service: "po.hub.v1",
38
+ service: "po.hub",
39
39
  member: "task_graph",
40
40
  kind: "channel",
41
41
  direction: "server-to-client",
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'po.hub.v1',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK;AACf,MAAM,YAA8B,WAAgB,KAAK,MAAM,OAAO,KAAK,UAAU,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqB,KAAK,OAAO;CAC5C,OAAO,KAAK,MACV,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAW,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAE,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
1
+ {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nexport const TasksPayloadSchema = Type.Object({\n tasks: Type.Array(\n Type.Object({\n id: N,\n subject: S,\n description: O(S),\n activeForm: O(S),\n status: literals(['pending', 'in_progress', 'completed', 'failed', 'deleted']),\n blockedBy: Type.Array(N),\n owner: O(S),\n updatedAt: O(S),\n delegation: O(Type.Object({ agent: O(S), state: O(S) })),\n }),\n ),\n rev: N,\n});\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'tasks.channel',\n scope,\n service: 'po.hub',\n member: 'task_graph',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Task graph channel payload.',\n input: TasksPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK;AACf,MAAM,YAA8B,WAAgB,KAAK,MAAM,OAAO,KAAK,UAAU,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAa,qBAAqB,KAAK,OAAO;CAC5C,OAAO,KAAK,MACV,KAAK,OAAO;EACV,IAAI;EACJ,SAAS;EACT,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,SAAS;GAAC;GAAW;GAAe;GAAa;GAAU;EAAS,CAAC;EAC7E,WAAW,KAAK,MAAM,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,CAAC;EACd,YAAY,EAAE,KAAK,OAAO;GAAE,OAAO,EAAE,CAAC;GAAG,OAAO,EAAE,CAAC;EAAE,CAAC,CAAC;CACzD,CAAC,CACH;CACA,KAAK;AACP,CAAC;AACD,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
@@ -3,14 +3,14 @@
3
3
  * Extension configuration, read from the environment.
4
4
  *
5
5
  * Env rather than a config file: po already carries per-launch state to Pi
6
- * through env vars, so this keeps doom-task consistent with how the harness
6
+ * through env vars, so this keeps po-task consistent with how the harness
7
7
  * configures the rest of the extension set.
8
8
  */
9
- const MAX_WIDGET_LINES_ENV = "DOOM_TASK_MAX_WIDGET_LINES";
10
- const MAX_TASKS_ENV = "DOOM_TASK_MAX_TASKS";
11
- const COLLAPSE_KEY_ENV = "DOOM_TASK_COLLAPSE_KEY";
12
- const STORE_TTL_MS_ENV = "DOOM_TASK_STORE_TTL_MS";
13
- const DELEGATION_TIMEOUT_MS_ENV = "DOOM_TASK_DELEGATION_TIMEOUT_MS";
9
+ const MAX_WIDGET_LINES_ENV = "PO_TASK_MAX_WIDGET_LINES";
10
+ const MAX_TASKS_ENV = "PO_TASK_MAX_TASKS";
11
+ const COLLAPSE_KEY_ENV = "PO_TASK_COLLAPSE_KEY";
12
+ const STORE_TTL_MS_ENV = "PO_TASK_STORE_TTL_MS";
13
+ const DELEGATION_TIMEOUT_MS_ENV = "PO_TASK_DELEGATION_TIMEOUT_MS";
14
14
  const DEFAULT_MAX_WIDGET_LINES = 12;
15
15
  const DEFAULT_MAX_TASKS = 15;
16
16
  const DEFAULT_COLLAPSE_KEY = "ctrl+shift+t";
@@ -41,7 +41,7 @@ function parsePiTaskConfig(value) {
41
41
  }
42
42
  /** Rows the overlay may use for content, clamped to a sane range. */
43
43
  function getMaxWidgetLines(env = process.env) {
44
- const raw = Number.parseInt(env["DOOM_TASK_MAX_WIDGET_LINES"] ?? "", 10);
44
+ const raw = Number.parseInt(env["PO_TASK_MAX_WIDGET_LINES"] ?? "", 10);
45
45
  if (!Number.isFinite(raw)) return 12;
46
46
  return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);
47
47
  }
@@ -170,4 +170,4 @@ Object.defineProperty(exports, "resolveCollapseKey", {
170
170
  }
171
171
  });
172
172
 
173
- //# sourceMappingURL=config-CdX-Bv8q.cjs.map
173
+ //# sourceMappingURL=config-BC-bztyx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BC-bztyx.cjs","names":[],"sources":["../src/services/config/index.ts"],"sourcesContent":["/**\n * Extension configuration, read from the environment.\n *\n * Env rather than a config file: po already carries per-launch state to Pi\n * through env vars, so this keeps po-task consistent with how the harness\n * configures the rest of the extension set.\n */\n\nexport const MAX_WIDGET_LINES_ENV = 'PO_TASK_MAX_WIDGET_LINES';\nexport const MAX_TASKS_ENV = 'PO_TASK_MAX_TASKS';\nexport const COLLAPSE_KEY_ENV = 'PO_TASK_COLLAPSE_KEY';\nexport const STORE_TTL_MS_ENV = 'PO_TASK_STORE_TTL_MS';\nexport const DELEGATION_TIMEOUT_MS_ENV = 'PO_TASK_DELEGATION_TIMEOUT_MS';\n\nexport const DEFAULT_MAX_WIDGET_LINES = 12;\nexport const DEFAULT_MAX_TASKS = 15;\nexport const DEFAULT_COLLAPSE_KEY = 'ctrl+shift+t';\nexport const DEFAULT_STORE_TTL_MS = 30 * 24 * 60 * 60 * 1000;\n/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless\n * session still gets the failure and a model turn before draining gives up. */\nexport const DEFAULT_DELEGATION_TIMEOUT_MS = 20 * 60 * 1000;\nexport const COLLAPSE_KEY_OFF = 'off';\n\nconst MIN_WIDGET_LINES = 3;\nconst MAX_WIDGET_LINES = 60;\n\nexport interface PiTaskConfig {\n maxWidgetLines: number;\n maxTasks: number;\n storeTtlMs: number;\n collapseKey: string;\n delegationTimeoutMs: number;\n}\n\nfunction configRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\n/** Parse configuration only after the Pi host has applied its project-trust policy. */\nexport function parsePiTaskConfig(value: unknown): PiTaskConfig {\n const config = configRecord(value);\n const maxWidgetLines =\n typeof config.maxWidgetLines === 'number' && Number.isFinite(config.maxWidgetLines)\n ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES)\n : DEFAULT_MAX_WIDGET_LINES;\n const maxTasks =\n typeof config.maxTasks === 'number' && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0\n ? config.maxTasks\n : DEFAULT_MAX_TASKS;\n const storeTtlMs =\n typeof config.storeTtlMs === 'number' && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0\n ? config.storeTtlMs\n : DEFAULT_STORE_TTL_MS;\n const delegationTimeoutMs =\n typeof config.delegationTimeoutMs === 'number' &&\n Number.isFinite(config.delegationTimeoutMs) &&\n config.delegationTimeoutMs > 0\n ? config.delegationTimeoutMs\n : DEFAULT_DELEGATION_TIMEOUT_MS;\n const collapseKey =\n typeof config.collapseKey === 'string' && config.collapseKey.trim()\n ? config.collapseKey.trim().toLowerCase() === COLLAPSE_KEY_OFF\n ? COLLAPSE_KEY_OFF\n : config.collapseKey.trim()\n : DEFAULT_COLLAPSE_KEY;\n\n return { maxWidgetLines, maxTasks, storeTtlMs, collapseKey, delegationTimeoutMs };\n}\n\n/** Rows the overlay may use for content, clamped to a sane range. */\nexport function getMaxWidgetLines(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number.parseInt(env[MAX_WIDGET_LINES_ENV] ?? '', 10);\n if (!Number.isFinite(raw)) return DEFAULT_MAX_WIDGET_LINES;\n return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);\n}\n\n/** Maximum number of non-deleted tasks retained on one board. */\nexport function getMaxTasks(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[MAX_TASKS_ENV]);\n return Number.isSafeInteger(raw) && raw > 0 ? raw : DEFAULT_MAX_TASKS;\n}\n\n/** Retention window for inactive session-tree stores. */\nexport function getStoreTtlMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[STORE_TTL_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;\n}\n\n/** How long a delegated run may go without reporting a result. */\nexport function getDelegationTimeoutMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;\n}\n\n/** Collapse shortcut, or the `off` sentinel when the user disabled it. */\nexport function resolveCollapseKey(env: NodeJS.ProcessEnv = process.env): string {\n const configured = env[COLLAPSE_KEY_ENV]?.trim();\n if (!configured) return DEFAULT_COLLAPSE_KEY;\n return configured.toLowerCase() === COLLAPSE_KEY_OFF ? COLLAPSE_KEY_OFF : configured;\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAC7B,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,4BAA4B;AAEzC,MAAa,2BAA2B;AACxC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;;;AAGpC,MAAa,gCAAgC;AAC7C,MAAa,mBAAmB;AAEhC,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAUzB,SAAS,aAAa,OAAyC;CAC7D,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,QAAoC,CAAC;AACtH;;AAGA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,iBACJ,OAAO,OAAO,mBAAmB,YAAY,OAAO,SAAS,OAAO,cAAc,IAC9E,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,gBAAgB,GAAG,gBAAgB,IAAA;CAElF,MAAM,WACJ,OAAO,OAAO,aAAa,YAAY,OAAO,cAAc,OAAO,QAAQ,KAAK,OAAO,WAAW,IAC9F,OAAO,WAAA;CAEb,MAAM,aACJ,OAAO,OAAO,eAAe,YAAY,OAAO,SAAS,OAAO,UAAU,KAAK,OAAO,aAAa,IAC/F,OAAO,aACP;CACN,MAAM,sBACJ,OAAO,OAAO,wBAAwB,YACtC,OAAO,SAAS,OAAO,mBAAmB,KAC1C,OAAO,sBAAsB,IACzB,OAAO,sBACP;CAQN,OAAO;EAAE;EAAgB;EAAU;EAAY,aAN7C,OAAO,OAAO,gBAAgB,YAAY,OAAO,YAAY,KAAK,IAC9D,OAAO,YAAY,KAAK,CAAC,CAAC,YAAY,MAAA,QAAA,QAEpC,OAAO,YAAY,KAAK,IAC1B;EAEsD;CAAoB;AAClF;;AAGA,SAAgB,kBAAkB,MAAyB,QAAQ,KAAa;CAC9E,MAAM,MAAM,OAAO,SAAS,IAAA,+BAA6B,IAAI,EAAE;CAC/D,IAAI,CAAC,OAAO,SAAS,GAAG,GAAG,OAAA;CAC3B,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,gBAAgB,GAAG,gBAAgB;AACnE;;AAGA,SAAgB,YAAY,MAAyB,QAAQ,KAAa;CACxE,MAAM,MAAM,OAAO,IAAI,cAAc;CACrC,OAAO,OAAO,cAAc,GAAG,KAAK,MAAM,IAAI,MAAA;AAChD;;AAGA,SAAgB,cAAc,MAAyB,QAAQ,KAAa;CAC1E,MAAM,MAAM,OAAO,IAAI,iBAAiB;CACxC,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,uBAAuB,MAAyB,QAAQ,KAAa;CACnF,MAAM,MAAM,OAAO,IAAI,0BAA0B;CACjD,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,mBAAmB,MAAyB,QAAQ,KAAa;CAC/E,MAAM,aAAa,IAAI,iBAAiB,EAAE,KAAK;CAC/C,IAAI,CAAC,YAAY,OAAO;CACxB,OAAO,WAAW,YAAY,MAAA,QAAA,QAA4C;AAC5E"}
@@ -3,14 +3,14 @@
3
3
  * Extension configuration, read from the environment.
4
4
  *
5
5
  * Env rather than a config file: po already carries per-launch state to Pi
6
- * through env vars, so this keeps doom-task consistent with how the harness
6
+ * through env vars, so this keeps po-task consistent with how the harness
7
7
  * configures the rest of the extension set.
8
8
  */
9
- const MAX_WIDGET_LINES_ENV = "DOOM_TASK_MAX_WIDGET_LINES";
10
- const MAX_TASKS_ENV = "DOOM_TASK_MAX_TASKS";
11
- const COLLAPSE_KEY_ENV = "DOOM_TASK_COLLAPSE_KEY";
12
- const STORE_TTL_MS_ENV = "DOOM_TASK_STORE_TTL_MS";
13
- const DELEGATION_TIMEOUT_MS_ENV = "DOOM_TASK_DELEGATION_TIMEOUT_MS";
9
+ const MAX_WIDGET_LINES_ENV = "PO_TASK_MAX_WIDGET_LINES";
10
+ const MAX_TASKS_ENV = "PO_TASK_MAX_TASKS";
11
+ const COLLAPSE_KEY_ENV = "PO_TASK_COLLAPSE_KEY";
12
+ const STORE_TTL_MS_ENV = "PO_TASK_STORE_TTL_MS";
13
+ const DELEGATION_TIMEOUT_MS_ENV = "PO_TASK_DELEGATION_TIMEOUT_MS";
14
14
  const DEFAULT_MAX_WIDGET_LINES = 12;
15
15
  const DEFAULT_MAX_TASKS = 15;
16
16
  const DEFAULT_COLLAPSE_KEY = "ctrl+shift+t";
@@ -41,7 +41,7 @@ function parsePiTaskConfig(value) {
41
41
  }
42
42
  /** Rows the overlay may use for content, clamped to a sane range. */
43
43
  function getMaxWidgetLines(env = process.env) {
44
- const raw = Number.parseInt(env["DOOM_TASK_MAX_WIDGET_LINES"] ?? "", 10);
44
+ const raw = Number.parseInt(env["PO_TASK_MAX_WIDGET_LINES"] ?? "", 10);
45
45
  if (!Number.isFinite(raw)) return 12;
46
46
  return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);
47
47
  }
@@ -69,4 +69,4 @@ function resolveCollapseKey(env = process.env) {
69
69
  //#endregion
70
70
  export { resolveCollapseKey as _, DEFAULT_MAX_TASKS as a, DELEGATION_TIMEOUT_MS_ENV as c, STORE_TTL_MS_ENV as d, getDelegationTimeoutMs as f, parsePiTaskConfig as g, getStoreTtlMs as h, DEFAULT_DELEGATION_TIMEOUT_MS as i, MAX_TASKS_ENV as l, getMaxWidgetLines as m, COLLAPSE_KEY_OFF as n, DEFAULT_MAX_WIDGET_LINES as o, getMaxTasks as p, DEFAULT_COLLAPSE_KEY as r, DEFAULT_STORE_TTL_MS as s, COLLAPSE_KEY_ENV as t, MAX_WIDGET_LINES_ENV as u };
71
71
 
72
- //# sourceMappingURL=config-CFSs3iku.mjs.map
72
+ //# sourceMappingURL=config-BTadoGeF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BTadoGeF.mjs","names":[],"sources":["../src/services/config/index.ts"],"sourcesContent":["/**\n * Extension configuration, read from the environment.\n *\n * Env rather than a config file: po already carries per-launch state to Pi\n * through env vars, so this keeps po-task consistent with how the harness\n * configures the rest of the extension set.\n */\n\nexport const MAX_WIDGET_LINES_ENV = 'PO_TASK_MAX_WIDGET_LINES';\nexport const MAX_TASKS_ENV = 'PO_TASK_MAX_TASKS';\nexport const COLLAPSE_KEY_ENV = 'PO_TASK_COLLAPSE_KEY';\nexport const STORE_TTL_MS_ENV = 'PO_TASK_STORE_TTL_MS';\nexport const DELEGATION_TIMEOUT_MS_ENV = 'PO_TASK_DELEGATION_TIMEOUT_MS';\n\nexport const DEFAULT_MAX_WIDGET_LINES = 12;\nexport const DEFAULT_MAX_TASKS = 15;\nexport const DEFAULT_COLLAPSE_KEY = 'ctrl+shift+t';\nexport const DEFAULT_STORE_TTL_MS = 30 * 24 * 60 * 60 * 1000;\n/** Deliberately under the subagents auto-drain ceiling (30 min) so a headless\n * session still gets the failure and a model turn before draining gives up. */\nexport const DEFAULT_DELEGATION_TIMEOUT_MS = 20 * 60 * 1000;\nexport const COLLAPSE_KEY_OFF = 'off';\n\nconst MIN_WIDGET_LINES = 3;\nconst MAX_WIDGET_LINES = 60;\n\nexport interface PiTaskConfig {\n maxWidgetLines: number;\n maxTasks: number;\n storeTtlMs: number;\n collapseKey: string;\n delegationTimeoutMs: number;\n}\n\nfunction configRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\n/** Parse configuration only after the Pi host has applied its project-trust policy. */\nexport function parsePiTaskConfig(value: unknown): PiTaskConfig {\n const config = configRecord(value);\n const maxWidgetLines =\n typeof config.maxWidgetLines === 'number' && Number.isFinite(config.maxWidgetLines)\n ? Math.min(Math.max(config.maxWidgetLines, MIN_WIDGET_LINES), MAX_WIDGET_LINES)\n : DEFAULT_MAX_WIDGET_LINES;\n const maxTasks =\n typeof config.maxTasks === 'number' && Number.isSafeInteger(config.maxTasks) && config.maxTasks > 0\n ? config.maxTasks\n : DEFAULT_MAX_TASKS;\n const storeTtlMs =\n typeof config.storeTtlMs === 'number' && Number.isFinite(config.storeTtlMs) && config.storeTtlMs > 0\n ? config.storeTtlMs\n : DEFAULT_STORE_TTL_MS;\n const delegationTimeoutMs =\n typeof config.delegationTimeoutMs === 'number' &&\n Number.isFinite(config.delegationTimeoutMs) &&\n config.delegationTimeoutMs > 0\n ? config.delegationTimeoutMs\n : DEFAULT_DELEGATION_TIMEOUT_MS;\n const collapseKey =\n typeof config.collapseKey === 'string' && config.collapseKey.trim()\n ? config.collapseKey.trim().toLowerCase() === COLLAPSE_KEY_OFF\n ? COLLAPSE_KEY_OFF\n : config.collapseKey.trim()\n : DEFAULT_COLLAPSE_KEY;\n\n return { maxWidgetLines, maxTasks, storeTtlMs, collapseKey, delegationTimeoutMs };\n}\n\n/** Rows the overlay may use for content, clamped to a sane range. */\nexport function getMaxWidgetLines(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number.parseInt(env[MAX_WIDGET_LINES_ENV] ?? '', 10);\n if (!Number.isFinite(raw)) return DEFAULT_MAX_WIDGET_LINES;\n return Math.min(Math.max(raw, MIN_WIDGET_LINES), MAX_WIDGET_LINES);\n}\n\n/** Maximum number of non-deleted tasks retained on one board. */\nexport function getMaxTasks(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[MAX_TASKS_ENV]);\n return Number.isSafeInteger(raw) && raw > 0 ? raw : DEFAULT_MAX_TASKS;\n}\n\n/** Retention window for inactive session-tree stores. */\nexport function getStoreTtlMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[STORE_TTL_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STORE_TTL_MS;\n}\n\n/** How long a delegated run may go without reporting a result. */\nexport function getDelegationTimeoutMs(env: NodeJS.ProcessEnv = process.env): number {\n const raw = Number(env[DELEGATION_TIMEOUT_MS_ENV]);\n return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_DELEGATION_TIMEOUT_MS;\n}\n\n/** Collapse shortcut, or the `off` sentinel when the user disabled it. */\nexport function resolveCollapseKey(env: NodeJS.ProcessEnv = process.env): string {\n const configured = env[COLLAPSE_KEY_ENV]?.trim();\n if (!configured) return DEFAULT_COLLAPSE_KEY;\n return configured.toLowerCase() === COLLAPSE_KEY_OFF ? COLLAPSE_KEY_OFF : configured;\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAC7B,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,4BAA4B;AAEzC,MAAa,2BAA2B;AACxC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;;;AAGpC,MAAa,gCAAgC;AAC7C,MAAa,mBAAmB;AAEhC,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AAUzB,SAAS,aAAa,OAAyC;CAC7D,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,QAAoC,CAAC;AACtH;;AAGA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,iBACJ,OAAO,OAAO,mBAAmB,YAAY,OAAO,SAAS,OAAO,cAAc,IAC9E,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,gBAAgB,GAAG,gBAAgB,IAAA;CAElF,MAAM,WACJ,OAAO,OAAO,aAAa,YAAY,OAAO,cAAc,OAAO,QAAQ,KAAK,OAAO,WAAW,IAC9F,OAAO,WAAA;CAEb,MAAM,aACJ,OAAO,OAAO,eAAe,YAAY,OAAO,SAAS,OAAO,UAAU,KAAK,OAAO,aAAa,IAC/F,OAAO,aACP;CACN,MAAM,sBACJ,OAAO,OAAO,wBAAwB,YACtC,OAAO,SAAS,OAAO,mBAAmB,KAC1C,OAAO,sBAAsB,IACzB,OAAO,sBACP;CAQN,OAAO;EAAE;EAAgB;EAAU;EAAY,aAN7C,OAAO,OAAO,gBAAgB,YAAY,OAAO,YAAY,KAAK,IAC9D,OAAO,YAAY,KAAK,CAAC,CAAC,YAAY,MAAA,QAAA,QAEpC,OAAO,YAAY,KAAK,IAC1B;EAEsD;CAAoB;AAClF;;AAGA,SAAgB,kBAAkB,MAAyB,QAAQ,KAAa;CAC9E,MAAM,MAAM,OAAO,SAAS,IAAA,+BAA6B,IAAI,EAAE;CAC/D,IAAI,CAAC,OAAO,SAAS,GAAG,GAAG,OAAA;CAC3B,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,gBAAgB,GAAG,gBAAgB;AACnE;;AAGA,SAAgB,YAAY,MAAyB,QAAQ,KAAa;CACxE,MAAM,MAAM,OAAO,IAAI,cAAc;CACrC,OAAO,OAAO,cAAc,GAAG,KAAK,MAAM,IAAI,MAAA;AAChD;;AAGA,SAAgB,cAAc,MAAyB,QAAQ,KAAa;CAC1E,MAAM,MAAM,OAAO,IAAI,iBAAiB;CACxC,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,uBAAuB,MAAyB,QAAQ,KAAa;CACnF,MAAM,MAAM,OAAO,IAAI,0BAA0B;CACjD,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM;AACjD;;AAGA,SAAgB,mBAAmB,MAAyB,QAAQ,KAAa;CAC/E,MAAM,aAAa,IAAI,iBAAiB,EAAE,KAAK;CAC/C,IAAI,CAAC,YAAY,OAAO;CACxB,OAAO,WAAW,YAAY,MAAA,QAAA,QAA4C;AAC5E"}
package/dist/config.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_config = require("./config-CdX-Bv8q.cjs");
2
+ const require_config = require("./config-BC-bztyx.cjs");
3
3
  exports.COLLAPSE_KEY_ENV = require_config.COLLAPSE_KEY_ENV;
4
4
  exports.COLLAPSE_KEY_OFF = require_config.COLLAPSE_KEY_OFF;
5
5
  exports.DEFAULT_COLLAPSE_KEY = require_config.DEFAULT_COLLAPSE_KEY;
package/dist/config.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as parsePiTaskConfig, a as DEFAULT_MAX_TASKS, c as DELEGATION_TIMEOUT_MS_ENV, d as PiTaskConfig, f as STORE_TTL_MS_ENV, g as getStoreTtlMs, h as getMaxWidgetLines, i as DEFAULT_DELEGATION_TIMEOUT_MS, l as MAX_TASKS_ENV, m as getMaxTasks, n as COLLAPSE_KEY_OFF, o as DEFAULT_MAX_WIDGET_LINES, p as getDelegationTimeoutMs, r as DEFAULT_COLLAPSE_KEY, s as DEFAULT_STORE_TTL_MS, t as COLLAPSE_KEY_ENV, u as MAX_WIDGET_LINES_ENV, v as resolveCollapseKey } from "./index-B-3sCF2S.mjs";
1
+ import { _ as parsePiTaskConfig, a as DEFAULT_MAX_TASKS, c as DELEGATION_TIMEOUT_MS_ENV, d as PiTaskConfig, f as STORE_TTL_MS_ENV, g as getStoreTtlMs, h as getMaxWidgetLines, i as DEFAULT_DELEGATION_TIMEOUT_MS, l as MAX_TASKS_ENV, m as getMaxTasks, n as COLLAPSE_KEY_OFF, o as DEFAULT_MAX_WIDGET_LINES, p as getDelegationTimeoutMs, r as DEFAULT_COLLAPSE_KEY, s as DEFAULT_STORE_TTL_MS, t as COLLAPSE_KEY_ENV, u as MAX_WIDGET_LINES_ENV, v as resolveCollapseKey } from "./index-BsZ8DxpJ.mjs";
2
2
  export { COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_TASKS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, MAX_TASKS_ENV, MAX_WIDGET_LINES_ENV, PiTaskConfig, STORE_TTL_MS_ENV, getDelegationTimeoutMs, getMaxTasks, getMaxWidgetLines, getStoreTtlMs, parsePiTaskConfig, resolveCollapseKey };
package/dist/config.mjs CHANGED
@@ -1,2 +1 @@
1
- import { _ as resolveCollapseKey, a as DEFAULT_MAX_TASKS, c as DELEGATION_TIMEOUT_MS_ENV, d as STORE_TTL_MS_ENV, f as getDelegationTimeoutMs, g as parsePiTaskConfig, h as getStoreTtlMs, i as DEFAULT_DELEGATION_TIMEOUT_MS, l as MAX_TASKS_ENV, m as getMaxWidgetLines, n as COLLAPSE_KEY_OFF, o as DEFAULT_MAX_WIDGET_LINES, p as getMaxTasks, r as DEFAULT_COLLAPSE_KEY, s as DEFAULT_STORE_TTL_MS, t as COLLAPSE_KEY_ENV, u as MAX_WIDGET_LINES_ENV } from "./config-CFSs3iku.mjs";
2
- export { COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_TASKS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, MAX_TASKS_ENV, MAX_WIDGET_LINES_ENV, STORE_TTL_MS_ENV, getDelegationTimeoutMs, getMaxTasks, getMaxWidgetLines, getStoreTtlMs, parsePiTaskConfig, resolveCollapseKey };
1
+ export { t as COLLAPSE_KEY_ENV, n as COLLAPSE_KEY_OFF, r as DEFAULT_COLLAPSE_KEY, i as DEFAULT_DELEGATION_TIMEOUT_MS, a as DEFAULT_MAX_TASKS, o as DEFAULT_MAX_WIDGET_LINES, s as DEFAULT_STORE_TTL_MS, c as DELEGATION_TIMEOUT_MS_ENV, l as MAX_TASKS_ENV, u as MAX_WIDGET_LINES_ENV, d as STORE_TTL_MS_ENV, f as getDelegationTimeoutMs, p as getMaxTasks, m as getMaxWidgetLines, h as getStoreTtlMs, g as parsePiTaskConfig, _ as resolveCollapseKey } from "./config-BTadoGeF.mjs";
@@ -1,12 +1,12 @@
1
1
  import { i as isTaskListComplete, r as isBlocked } from "./taskGraph-BOQvT0-M.mjs";
2
2
  import "./delegation-BiOy3_7g.mjs";
3
- import { t as TASK_EVENT } from "./telemetry-DyS44zAD.mjs";
3
+ import { t as TASK_EVENT } from "./telemetry-gEGWTaMI.mjs";
4
4
  import { i as isDelegationActive } from "./task-giCbpKzV.mjs";
5
5
  import { r as reconcileOrphanedDelegations } from "./reconcile-BcD-hTbd.mjs";
6
- import { DOOM_DELEGATION_ACCEPTED_EVENT, DOOM_DELEGATION_FINISHED_EVENT, DOOM_DELEGATION_STARTED_EVENT, DOOM_DELEGATION_UPDATED_EVENT } from "@agimon-ai/po-core/delegation";
6
+ import { PO_DELEGATION_ACCEPTED_EVENT, PO_DELEGATION_FINISHED_EVENT, PO_DELEGATION_STARTED_EVENT, PO_DELEGATION_UPDATED_EVENT } from "@agimon-ai/po-core/delegation";
7
7
  //#region src/services/delegation/index.ts
8
- const NOTIFY_CUSTOM_TYPE = "doom-task-notify";
9
- const BACKGROUND_WORK_PROVIDER = "doom-task";
8
+ const NOTIFY_CUSTOM_TYPE = "po-task-notify";
9
+ const BACKGROUND_WORK_PROVIDER = "po-task";
10
10
  const DEFAULT_STARTED_TIMEOUT_MS = 5e3;
11
11
  const DEFAULT_RUN_TIMEOUT_MS = 12e5;
12
12
  const DEFAULT_CANCEL_TIMEOUT_MS = 1e4;
@@ -59,7 +59,7 @@ function briefContext(options, cwd, platform) {
59
59
  /**
60
60
  * Build the brief handed to the subagent.
61
61
  *
62
- * Doom Team owns the child tool surface and the parent owns the task record.
62
+ * Po Team owns the child tool surface and the parent owns the task record.
63
63
  * Keeping those responsibilities explicit prevents a child from attempting to
64
64
  * call a task tool that is not loaded in its runtime, while still giving it a
65
65
  * reliable path to ask the parent for a decision.
@@ -86,7 +86,7 @@ function buildBrief(task, instructions, context) {
86
86
  * Owns the lifecycle of tasks delegated to subagents.
87
87
  *
88
88
  * Delegation rides Team's injected Cordis service rather than spawning
89
- * processes directly, so doom-task stays decoupled from the subagent runtime
89
+ * processes directly, so po-task stays decoupled from the subagent runtime
90
90
  * and degrades to a clear error when that service is not loaded.
91
91
  *
92
92
  * Liveness rule: every entry in `pendingTasks` has a timer armed against it, so
@@ -138,13 +138,13 @@ var DelegationManager = class DelegationManager {
138
138
  bind(ctx, service) {
139
139
  this.unbind();
140
140
  this.service = service;
141
- this.subscriptions.push(ctx.on(DOOM_DELEGATION_ACCEPTED_EVENT, (event) => {
141
+ this.subscriptions.push(ctx.on(PO_DELEGATION_ACCEPTED_EVENT, (event) => {
142
142
  this.handleAccepted(event);
143
- }), ctx.on(DOOM_DELEGATION_STARTED_EVENT, (event) => {
143
+ }), ctx.on(PO_DELEGATION_STARTED_EVENT, (event) => {
144
144
  this.handleStarted(event);
145
- }), ctx.on(DOOM_DELEGATION_UPDATED_EVENT, (event) => {
145
+ }), ctx.on(PO_DELEGATION_UPDATED_EVENT, (event) => {
146
146
  this.handleUpdate(event);
147
- }), ctx.on(DOOM_DELEGATION_FINISHED_EVENT, (event) => {
147
+ }), ctx.on(PO_DELEGATION_FINISHED_EVENT, (event) => {
148
148
  this.handleResponse(event).catch((error) => {
149
149
  this.report(TASK_EVENT.delegationResponseFailed, error, { [REQUEST_ID_ATTRIBUTE]: event.requestId });
150
150
  });
@@ -623,4 +623,4 @@ var DelegationManager = class DelegationManager {
623
623
  //#endregion
624
624
  export { ERR_NO_RUNTIME as a, ERR_CHILD_SESSION as i, DelegationManager as n, NOTIFY_CUSTOM_TYPE as o, ERR_CANCEL_UNACKNOWLEDGED as r, BACKGROUND_WORK_PROVIDER as t };
625
625
 
626
- //# sourceMappingURL=delegation-CdMqOZB4.mjs.map
626
+ //# sourceMappingURL=delegation-Dsqf7fUM.mjs.map