@nathanmauro/agentic-sdk-core 0.0.0-stage → 0.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 (113) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +13 -2
  3. package/dist/actions.d.ts +439 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +547 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/contract/compat.d.ts +66 -0
  8. package/dist/contract/compat.d.ts.map +1 -0
  9. package/dist/contract/compat.js +414 -0
  10. package/dist/contract/compat.js.map +1 -0
  11. package/dist/contract/conformance.d.ts +186 -0
  12. package/dist/contract/conformance.d.ts.map +1 -0
  13. package/dist/contract/conformance.js +2 -0
  14. package/dist/contract/conformance.js.map +1 -0
  15. package/dist/contract/grease.d.ts +42 -0
  16. package/dist/contract/grease.d.ts.map +1 -0
  17. package/dist/contract/grease.js +160 -0
  18. package/dist/contract/grease.js.map +1 -0
  19. package/dist/contract/index.d.ts +46 -0
  20. package/dist/contract/index.d.ts.map +1 -0
  21. package/dist/contract/index.js +40 -0
  22. package/dist/contract/index.js.map +1 -0
  23. package/dist/contract/lint.d.ts +4 -0
  24. package/dist/contract/lint.d.ts.map +1 -0
  25. package/dist/contract/lint.js +445 -0
  26. package/dist/contract/lint.js.map +1 -0
  27. package/dist/contract/read.d.ts +50 -0
  28. package/dist/contract/read.d.ts.map +1 -0
  29. package/dist/contract/read.js +93 -0
  30. package/dist/contract/read.js.map +1 -0
  31. package/dist/contract/schema.gen.d.ts +5 -0
  32. package/dist/contract/schema.gen.d.ts.map +1 -0
  33. package/dist/contract/schema.gen.js +2814 -0
  34. package/dist/contract/schema.gen.js.map +1 -0
  35. package/dist/contract/types.gen.d.ts +1223 -0
  36. package/dist/contract/types.gen.d.ts.map +1 -0
  37. package/dist/contract/types.gen.js +8 -0
  38. package/dist/contract/types.gen.js.map +1 -0
  39. package/dist/contract/validate.d.ts +47 -0
  40. package/dist/contract/validate.d.ts.map +1 -0
  41. package/dist/contract/validate.js +268 -0
  42. package/dist/contract/validate.js.map +1 -0
  43. package/dist/fold/claude.d.ts +71 -0
  44. package/dist/fold/claude.d.ts.map +1 -0
  45. package/dist/fold/claude.js +1432 -0
  46. package/dist/fold/claude.js.map +1 -0
  47. package/dist/fold/codex.d.ts +126 -0
  48. package/dist/fold/codex.d.ts.map +1 -0
  49. package/dist/fold/codex.js +1499 -0
  50. package/dist/fold/codex.js.map +1 -0
  51. package/dist/fold/envelope.d.ts +76 -0
  52. package/dist/fold/envelope.d.ts.map +1 -0
  53. package/dist/fold/envelope.js +706 -0
  54. package/dist/fold/envelope.js.map +1 -0
  55. package/dist/fold/events.d.ts +26 -0
  56. package/dist/fold/events.d.ts.map +1 -0
  57. package/dist/fold/events.js +2 -0
  58. package/dist/fold/events.js.map +1 -0
  59. package/dist/fold/index.d.ts +5 -0
  60. package/dist/fold/index.d.ts.map +1 -0
  61. package/dist/fold/index.js +5 -0
  62. package/dist/fold/index.js.map +1 -0
  63. package/dist/index.d.ts +8 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +8 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/model.d.ts +354 -0
  68. package/dist/model.d.ts.map +1 -0
  69. package/dist/model.js +45 -0
  70. package/dist/model.js.map +1 -0
  71. package/dist/sanitize.d.ts +24 -0
  72. package/dist/sanitize.d.ts.map +1 -0
  73. package/dist/sanitize.js +230 -0
  74. package/dist/sanitize.js.map +1 -0
  75. package/dist/shell.d.ts +55 -0
  76. package/dist/shell.d.ts.map +1 -0
  77. package/dist/shell.js +1162 -0
  78. package/dist/shell.js.map +1 -0
  79. package/dist/uri.d.ts +60 -0
  80. package/dist/uri.d.ts.map +1 -0
  81. package/dist/uri.js +264 -0
  82. package/dist/uri.js.map +1 -0
  83. package/dist/view.d.ts +95 -0
  84. package/dist/view.d.ts.map +1 -0
  85. package/dist/view.js +363 -0
  86. package/dist/view.js.map +1 -0
  87. package/dist/wire.d.ts +158 -0
  88. package/dist/wire.d.ts.map +1 -0
  89. package/dist/wire.js +46 -0
  90. package/dist/wire.js.map +1 -0
  91. package/package.json +47 -3
  92. package/src/actions.ts +1055 -0
  93. package/src/contract/compat.ts +519 -0
  94. package/src/contract/conformance.ts +163 -0
  95. package/src/contract/grease.ts +248 -0
  96. package/src/contract/index.ts +85 -0
  97. package/src/contract/lint.ts +579 -0
  98. package/src/contract/read.ts +195 -0
  99. package/src/contract/schema.gen.ts +2815 -0
  100. package/src/contract/types.gen.ts +1448 -0
  101. package/src/contract/validate.ts +379 -0
  102. package/src/fold/claude.ts +1969 -0
  103. package/src/fold/codex.ts +2288 -0
  104. package/src/fold/envelope.ts +956 -0
  105. package/src/fold/events.ts +20 -0
  106. package/src/fold/index.ts +4 -0
  107. package/src/index.ts +7 -0
  108. package/src/model.ts +460 -0
  109. package/src/sanitize.ts +290 -0
  110. package/src/shell.ts +1489 -0
  111. package/src/uri.ts +410 -0
  112. package/src/view.ts +549 -0
  113. package/src/wire.ts +216 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
- # Temporary Holding Version
1
+ # @nathanmauro/agentic-sdk-core
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The model and the `agentic/1` contract of [agentic-sdk](https://github.com/nathanmauro/agentic-sdk),
4
+ and the folds that read Claude Code and Codex transcript lines into it. Pure: no file system,
5
+ no process, no network, so it runs anywhere JavaScript does.
6
+
7
+ - `@nathanmauro/agentic-sdk-core`: the model (sessions, turns, commands, outputs), command views, shell
8
+ parsing and risk, actions, display sanitising.
9
+ - `@nathanmauro/agentic-sdk-core/fold`: `claudeFold` and `codexFold`, incremental folds over transcript lines.
10
+ - `@nathanmauro/agentic-sdk-core/contract`: the JSON Schema, its generated types, a validator, and the
11
+ compatibility gate between revisions.
12
+
13
+ To read transcripts from disk, use [`@nathanmauro/agentic-sdk-node`](https://www.npmjs.com/package/@nathanmauro/agentic-sdk-node).
14
+ Apache-2.0.
@@ -0,0 +1,439 @@
1
+ import type { Attention, Binding, BlobHandle, InfraDriftReport, InfraPlanArtifact, ItemRef, SessionFact, SessionUri, SlotUri, StackUri } from './model.js';
2
+ import type { CommandView, OutputView } from './view.js';
3
+ import type { InfraStackStatus } from './wire.js';
4
+ export type ActionId = 'copyCommand' | 'copyOutput' | 'copyOutputRaw' | 'explain' | 'open' | 'diff' | 'resume' | 'fork' | 'shareLink' | 'lastAnswer' | 'focus' | 'send' | 'interrupt' | 'approve' | 'infraPlan' | 'infraApply' | 'infraRevert' | 'infraDrift';
5
+ export type SurfaceCap = 'clipboard' | 'blob_fetch' | 'open_editor' | 'diff_view' | 'pane_focus' | 'share_url' | 'voice_tts';
6
+ export type RuntimeCap = 'commands' | 'full_output' | 'last_answer' | 'diff' | 'focus' | 'send' | 'interrupt' | 'approve' | 'resume' | 'fork' | 'infra_plan' | 'infra_apply' | 'infra_revert' | 'infra_drift';
7
+ export type RefusalCode = 'no_binding' | 'stale_binding' | 'owned_elsewhere' | 'prompt_open' | 'composer_dirty' | 'needs_confirmation' | 'unsupported' | 'no_output' | 'missing_surface_cap' | 'stale_state' | 'plan_drifted' | 'spec_dirty' | 'plan_failed' | 'cancelled' | 'imperative_infra_mutation';
8
+ export interface Safety {
9
+ readonly readOnly: boolean;
10
+ readonly destructive: boolean;
11
+ readonly idempotent: boolean;
12
+ readonly requiresConfirmation: boolean;
13
+ readonly sideEffect: 'none' | 'clipboard' | 'navigation' | 'session_write' | 'process_exec';
14
+ }
15
+ export type Op = {
16
+ readonly op: 'send';
17
+ readonly text: string;
18
+ } | {
19
+ readonly op: 'interrupt';
20
+ } | {
21
+ readonly op: 'approve';
22
+ readonly optionId: string;
23
+ readonly approvalItemId: string;
24
+ readonly promptHash: string;
25
+ } | {
26
+ readonly op: 'resume';
27
+ } | {
28
+ readonly op: 'fork';
29
+ readonly fromTurnId?: string;
30
+ } | {
31
+ readonly op: 'diff';
32
+ } | {
33
+ readonly op: 'infra_plan';
34
+ /** Plan the spec of this ledger revision, as a revert to it would, not the working one. */
35
+ readonly targetRevision?: number;
36
+ } | {
37
+ readonly op: 'infra_apply';
38
+ readonly planHash: string;
39
+ } | {
40
+ readonly op: 'infra_revert';
41
+ /** Ledger revision whose spec the stack converges to. */
42
+ readonly targetRevision: number;
43
+ } | {
44
+ readonly op: 'infra_drift';
45
+ };
46
+ /**
47
+ * What the authority resolves and acts on. `kind` says which of the three it is; a reader
48
+ * never has to guess from which properties are present.
49
+ */
50
+ export type InvokeTarget = {
51
+ readonly kind: 'slot';
52
+ readonly slot: SlotUri;
53
+ readonly expectSession: SessionUri;
54
+ readonly epoch: number;
55
+ } | {
56
+ readonly kind: 'session';
57
+ readonly session: SessionUri;
58
+ } | {
59
+ readonly kind: 'stack';
60
+ readonly stack: string;
61
+ };
62
+ /** What an action is about, for display and for grouping buttons. No gate reads it. */
63
+ export type ActionSubject = {
64
+ readonly kind: 'item';
65
+ readonly ref: ItemRef;
66
+ } | {
67
+ readonly kind: 'session';
68
+ readonly uri: SessionUri;
69
+ } | {
70
+ readonly kind: 'stack';
71
+ readonly uri: StackUri;
72
+ };
73
+ /**
74
+ * Wire-safe invocation reference. The authority re-resolves the target and recomputes safety
75
+ * server-side; nothing here is trusted beyond naming what the caller wants.
76
+ *
77
+ * A ref round-trips verbatim: a caller sends back exactly the object a descriptor carried,
78
+ * adding only `confirmToken`. It never rebuilds one from parts it understood.
79
+ */
80
+ /**
81
+ * `target` and `op` are the whole of a ref. A descriptor's ref carries the rest for display;
82
+ * a caller that names a stack itself may leave it out.
83
+ */
84
+ export interface ActionRef {
85
+ /** For display. When present it must be the action the op belongs to. */
86
+ readonly actionId?: ActionId;
87
+ /** For display. No gate reads it. */
88
+ readonly subject?: ActionSubject;
89
+ readonly target: InvokeTarget;
90
+ readonly op: Op;
91
+ /**
92
+ * Version of the target's authority-owned state the caller saw: the fold version for a
93
+ * session, the ledger sequence for a stack. A mutating op is refused without it.
94
+ */
95
+ readonly stateVersion?: number;
96
+ /** Display tag for deduping buttons. The authority never compares it. */
97
+ readonly argsHash?: string;
98
+ /**
99
+ * Set by the surface that issued the ref, never by a caller. A ref that carries one must
100
+ * come back equal to what was issued, `confirmToken` apart (`sealRef` in the node package).
101
+ */
102
+ readonly seal?: string;
103
+ /** Server-issued, single-use. Proves that what was confirmed is what runs. */
104
+ readonly confirmToken?: string;
105
+ }
106
+ export type ActionEffect = {
107
+ readonly kind: 'copy';
108
+ readonly inline: string;
109
+ readonly fullHandle?: BlobHandle;
110
+ readonly complete: boolean;
111
+ readonly rawAvailable: boolean;
112
+ } | {
113
+ readonly kind: 'open_location';
114
+ readonly path: string;
115
+ readonly line?: number;
116
+ } | {
117
+ readonly kind: 'navigate';
118
+ readonly target: SessionUri | SlotUri;
119
+ readonly fallbackCopyText: string;
120
+ } | {
121
+ readonly kind: 'present_text';
122
+ readonly title: string;
123
+ readonly text: string;
124
+ readonly spokenText?: string;
125
+ } | {
126
+ readonly kind: 'invoke';
127
+ readonly ref: ActionRef;
128
+ /** The same request as a command line. Absent when the surface has none for it. */
129
+ readonly cliArgv?: readonly string[];
130
+ };
131
+ export type ActionAvailability = {
132
+ readonly ok: true;
133
+ } | {
134
+ readonly ok: false;
135
+ readonly reason: RefusalCode;
136
+ };
137
+ export interface ActionDescriptor {
138
+ readonly id: ActionId;
139
+ readonly label: string;
140
+ readonly subject: ActionSubject;
141
+ readonly availability: ActionAvailability;
142
+ readonly effect: ActionEffect;
143
+ /**
144
+ * What running the action can do, for a surface to show. It is `safetyOf(effect)`, stated
145
+ * so a caller in another language does not need the table. The authority never reads it.
146
+ */
147
+ readonly safety: Safety;
148
+ }
149
+ export interface SendReceipt {
150
+ readonly kind: 'send';
151
+ readonly status: 'delivered' | 'queued' | 'unconfirmed';
152
+ /** The prompt item the text became. Present when `status` is `delivered`. */
153
+ readonly prompt?: ItemRef;
154
+ /** Names the send so a later read can settle it. Present when `status` is `unconfirmed`. */
155
+ readonly sendId?: string;
156
+ }
157
+ /** Proof that the authority claimed ledger sequence `seq` and ran the provider. */
158
+ export interface InfraReceipt {
159
+ readonly kind: 'infra';
160
+ readonly stack: string;
161
+ readonly seq: number;
162
+ readonly op: 'infra_apply' | 'infra_revert';
163
+ readonly planHash: string;
164
+ /** What the ledger recorded for `seq`. */
165
+ readonly status: 'applied' | 'failed';
166
+ }
167
+ export type Receipt = SendReceipt | InfraReceipt;
168
+ /** What an op hands back besides a receipt. `kind` says which. */
169
+ export type ExecuteData = InfraPlanArtifact | InfraDriftReport;
170
+ export type ExecuteDataKind = ExecuteData['kind'];
171
+ /**
172
+ * The op ran. A receipt is present exactly when something was claimed: a read, or an apply
173
+ * that found nothing to change, has none.
174
+ */
175
+ export interface ExecuteDone {
176
+ readonly outcome: 'done';
177
+ readonly receipt?: Receipt;
178
+ readonly data?: ExecuteData;
179
+ /** The transport left `data` out to fit its response limit. Ask again with a read. */
180
+ readonly dataOmitted?: boolean;
181
+ /** What the surface that answered offers next for the same target. See `resolveStackActions`. */
182
+ readonly actions?: readonly ActionDescriptor[];
183
+ }
184
+ /** Nothing was claimed and nothing ran. A refusal never carries a receipt. */
185
+ export interface ExecuteRefusal {
186
+ readonly outcome: 'refused';
187
+ readonly reason: RefusalCode;
188
+ readonly detail?: string;
189
+ readonly confirmToken?: string;
190
+ /**
191
+ * The plan the refusal is about: the one `confirmToken` is bound to, or with
192
+ * `plan_drifted` the plan as it is now. It is here even when `data` had to be left out.
193
+ */
194
+ readonly planHash?: string;
195
+ readonly data?: ExecuteData;
196
+ readonly dataOmitted?: boolean;
197
+ /**
198
+ * What the surface that answered offers next. When the refusal shows a plan, the apply or
199
+ * revert here names that plan: it is the ref to send back, with `confirmToken` added.
200
+ */
201
+ readonly actions?: readonly ActionDescriptor[];
202
+ }
203
+ export type FailureCode = 'apply_failed';
204
+ /**
205
+ * Something was claimed and then went wrong. Some of it may have taken effect, which is why
206
+ * this is not a refusal and always carries a receipt.
207
+ */
208
+ export interface ExecuteFailure {
209
+ readonly outcome: 'failed';
210
+ readonly reason: FailureCode;
211
+ readonly receipt: Receipt;
212
+ readonly detail: string;
213
+ }
214
+ /**
215
+ * `outcome` is the whole classification: `reason` explains it and may gain values, so a
216
+ * caller branches on `outcome` and only ever displays or matches `reason`.
217
+ */
218
+ export type ExecuteResult = ExecuteDone | ExecuteRefusal | ExecuteFailure;
219
+ /** What one op is: the action that names it, how safe it is, and what `data` it returns. */
220
+ export interface OpSpec {
221
+ readonly actionId: ActionId;
222
+ readonly safety: Safety;
223
+ readonly data: ExecuteDataKind | null;
224
+ }
225
+ /**
226
+ * The one table of ops. Safety, the read-only and mutating lists, the action an op belongs
227
+ * to and the shape of its `data` are all read from here, so they cannot disagree.
228
+ */
229
+ export declare const OP_TABLE: {
230
+ readonly send: {
231
+ readonly actionId: "send";
232
+ readonly safety: {
233
+ readonly readOnly: false;
234
+ readonly destructive: false;
235
+ readonly idempotent: false;
236
+ readonly requiresConfirmation: false;
237
+ readonly sideEffect: "session_write";
238
+ };
239
+ readonly data: null;
240
+ };
241
+ readonly interrupt: {
242
+ readonly actionId: "interrupt";
243
+ readonly safety: {
244
+ readonly readOnly: false;
245
+ readonly destructive: true;
246
+ readonly idempotent: true;
247
+ readonly requiresConfirmation: false;
248
+ readonly sideEffect: "session_write";
249
+ };
250
+ readonly data: null;
251
+ };
252
+ readonly approve: {
253
+ readonly actionId: "approve";
254
+ readonly safety: {
255
+ readonly readOnly: false;
256
+ readonly destructive: true;
257
+ readonly idempotent: false;
258
+ readonly requiresConfirmation: true;
259
+ readonly sideEffect: "session_write";
260
+ };
261
+ readonly data: null;
262
+ };
263
+ readonly resume: {
264
+ readonly actionId: "resume";
265
+ readonly safety: {
266
+ readonly readOnly: false;
267
+ readonly destructive: false;
268
+ readonly idempotent: false;
269
+ readonly requiresConfirmation: false;
270
+ readonly sideEffect: "process_exec";
271
+ };
272
+ readonly data: null;
273
+ };
274
+ readonly fork: {
275
+ readonly actionId: "fork";
276
+ readonly safety: {
277
+ readonly readOnly: false;
278
+ readonly destructive: false;
279
+ readonly idempotent: false;
280
+ readonly requiresConfirmation: false;
281
+ readonly sideEffect: "process_exec";
282
+ };
283
+ readonly data: null;
284
+ };
285
+ readonly diff: {
286
+ readonly actionId: "diff";
287
+ readonly safety: {
288
+ readonly sideEffect: "none";
289
+ readonly readOnly: true;
290
+ readonly destructive: false;
291
+ readonly idempotent: true;
292
+ readonly requiresConfirmation: false;
293
+ };
294
+ readonly data: null;
295
+ };
296
+ readonly infra_plan: {
297
+ readonly actionId: "infraPlan";
298
+ readonly safety: {
299
+ readonly sideEffect: "process_exec";
300
+ readonly readOnly: true;
301
+ readonly destructive: false;
302
+ readonly idempotent: true;
303
+ readonly requiresConfirmation: false;
304
+ };
305
+ readonly data: "infra_plan";
306
+ };
307
+ readonly infra_apply: {
308
+ readonly actionId: "infraApply";
309
+ readonly safety: {
310
+ readonly readOnly: false;
311
+ readonly destructive: true;
312
+ readonly idempotent: false;
313
+ readonly requiresConfirmation: true;
314
+ readonly sideEffect: "process_exec";
315
+ };
316
+ readonly data: "infra_plan";
317
+ };
318
+ readonly infra_revert: {
319
+ readonly actionId: "infraRevert";
320
+ readonly safety: {
321
+ readonly readOnly: false;
322
+ readonly destructive: true;
323
+ readonly idempotent: false;
324
+ readonly requiresConfirmation: true;
325
+ readonly sideEffect: "process_exec";
326
+ };
327
+ readonly data: "infra_plan";
328
+ };
329
+ readonly infra_drift: {
330
+ readonly actionId: "infraDrift";
331
+ readonly safety: {
332
+ readonly sideEffect: "process_exec";
333
+ readonly readOnly: true;
334
+ readonly destructive: false;
335
+ readonly idempotent: true;
336
+ readonly requiresConfirmation: false;
337
+ };
338
+ readonly data: "infra_drift";
339
+ };
340
+ };
341
+ export type OpKind = Op['op'];
342
+ type OpsWhereReadOnly<Flag extends boolean> = {
343
+ [K in OpKind]: (typeof OP_TABLE)[K]['safety']['readOnly'] extends Flag ? K : never;
344
+ }[OpKind];
345
+ export type ReadOnlyOpKind = OpsWhereReadOnly<true>;
346
+ export type MutatingOpKind = OpsWhereReadOnly<false>;
347
+ export declare function isOpKind(value: unknown): value is OpKind;
348
+ /** Ops that change nothing. A server always carries these. */
349
+ export declare const READ_ONLY_OPS: readonly ReadOnlyOpKind[];
350
+ /** Ops a server carries only when its parent spawned it with `--allow <op>`. */
351
+ export declare const MUTATING_OPS: readonly MutatingOpKind[];
352
+ /**
353
+ * Static safety table derived strictly from the effect shape.
354
+ * Safety is never read from untrusted wire JSON.
355
+ */
356
+ export declare function safetyOf(effect: ActionEffect): Safety;
357
+ export interface ActionCapabilitySnapshot {
358
+ readonly surface: ReadonlySet<SurfaceCap>;
359
+ readonly runtime?: ReadonlySet<RuntimeCap>;
360
+ }
361
+ export declare function resolveCommandActions(session: SessionFact, cmdView: CommandView, outputView: OutputView, caps: ActionCapabilitySnapshot): ActionDescriptor[];
362
+ export interface ResolveSessionActionsOptions {
363
+ readonly binding?: Binding;
364
+ readonly attention?: Attention;
365
+ readonly lastAnswer?: string;
366
+ readonly surfaceLink?: string;
367
+ readonly stateVersion?: number;
368
+ readonly surface: ReadonlySet<SurfaceCap>;
369
+ readonly runtime?: ReadonlySet<RuntimeCap>;
370
+ }
371
+ export declare function resolveSessionActions(session: SessionFact, opts: ResolveSessionActionsOptions): ActionDescriptor[];
372
+ export interface ResolveInfraActionsOptions {
373
+ readonly runtime?: ReadonlySet<RuntimeCap>;
374
+ /** Ledger revision to offer as the revert target. Without it no revert action is offered. */
375
+ readonly revertTo?: number;
376
+ }
377
+ /**
378
+ * A revert to offer. The ref is the same before and after its plan has been shown: the
379
+ * confirm token, not the ref, is what binds the second step to that plan.
380
+ */
381
+ export interface RevertOffer {
382
+ /** Ledger revision whose spec the stack converges to. */
383
+ readonly targetRevision: number;
384
+ }
385
+ export interface ResolveStackActionsOptions {
386
+ readonly runtime?: ReadonlySet<RuntimeCap>;
387
+ /**
388
+ * A plan of the working spec. Applying it is offered when it would change something and it
389
+ * was made at the state the stack is in. Never the plan a revert showed: that one is of a
390
+ * spec that is not in the working tree, and belongs in `revert`.
391
+ */
392
+ readonly plan?: InfraPlanArtifact;
393
+ /** The revert to offer. Default: back to `revertTargetOf(status)`, when there is one. */
394
+ readonly revert?: RevertOffer;
395
+ /**
396
+ * The working spec has edits no revision holds. A revert would be refused `spec_dirty`, so
397
+ * it is shown as unavailable for that reason instead of offered.
398
+ */
399
+ readonly specDirty?: boolean;
400
+ }
401
+ /**
402
+ * Resolves the Infrastructure-as-Code actions (Invariant #13) for one plan, by a caller that
403
+ * holds nothing but the plan. Apply binds the plan's exact `planHash` and `stateVersion`.
404
+ */
405
+ export declare function resolveInfraActions(plan: InfraPlanArtifact, opts?: ResolveInfraActionsOptions): ActionDescriptor[];
406
+ /**
407
+ * The revision a revert is offered to: the last one that applied before the stack got to
408
+ * where it is. With an applied head that is the applied revision before it; with a head
409
+ * that failed or has no outcome it is the last revision known to be good.
410
+ */
411
+ export declare function revertTargetOf(status: InfraStackStatus): number | undefined;
412
+ /**
413
+ * Resolves what can be done about a stack as its ledger stands: plan, check drift, revert to
414
+ * the revision before, and, given a plan of the working spec, apply exactly that plan. This
415
+ * is what a server puts in `actions`, so a client has no ref to write but the first one.
416
+ *
417
+ * Every ref names the state in `status`. A plan made at another state is not offered: an
418
+ * apply of it could only be refused as stale.
419
+ */
420
+ export declare function resolveStackActions(status: InfraStackStatus, opts?: ResolveStackActionsOptions): ActionDescriptor[];
421
+ export interface LocalActionHost {
422
+ copyText?(text: string): Promise<void> | void;
423
+ openLocation?(path: string, line?: number): Promise<void> | void;
424
+ navigate?(target: string, fallbackCopyText: string): Promise<void> | void;
425
+ presentText?(title: string, text: string, spokenText?: string): Promise<void> | void;
426
+ }
427
+ export type LocalEffectResult = {
428
+ readonly ok: true;
429
+ } | {
430
+ readonly ok: false;
431
+ readonly reason: 'requires_node_authority' | 'unsupported_host_effect';
432
+ };
433
+ /**
434
+ * Runs pure local UI effects on a surface host. Refuses `invoke` effects because
435
+ * authority lives strictly in @nathanmauro/agentic-sdk-node.
436
+ */
437
+ export declare function runLocalEffect(effect: ActionEffect, host: LocalActionHost): Promise<LocalEffectResult>;
438
+ export {};
439
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,UAAU,EACV,OAAO,EACP,QAAQ,EACT,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,QAAQ,GAChB,aAAa,GACb,YAAY,GACZ,eAAe,GACf,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,WAAW,GACX,YAAY,GACZ,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,WAAW,GACX,YAAY,GACZ,aAAa,GACb,YAAY,CAAC;AAEjB,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,aAAa,GACb,aAAa,GACb,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,oBAAoB,GACpB,aAAa,GACb,WAAW,GACX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