@ramex-labs/continuity-remote 0.3.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,204 @@
1
+ {
2
+ "kind": "continuity-remote-shared-core-build/1",
3
+ "compiler": "5.9.3",
4
+ "coreDependency": {
5
+ "name": "@ramex-labs/continuity",
6
+ "version": "0.3.0-preview.7",
7
+ "archiveSha256": "835c57a195b483b572e614e4f32b5894c478993baea512cba707f61f8f3dacf1"
8
+ },
9
+ "sources": [
10
+ {
11
+ "path": "packages/remote-tools/client.mjs",
12
+ "sha256": "4fe0bf01b46e9177fdf2ea15803b6c2457c05e0ba8008d3e7a96195bebf4d279"
13
+ },
14
+ {
15
+ "path": "packages/remote-tools/CONTRACT.md",
16
+ "sha256": "998937d1d799e1046236e97269d88e2eab942f80f0d443174d7c788faa91e096"
17
+ },
18
+ {
19
+ "path": "packages/remote-tools/destination.mjs",
20
+ "sha256": "755c1212f49af492c94b8de41cd49ca3c2e9c4bccac706465cc594442e72f3fe"
21
+ },
22
+ {
23
+ "path": "packages/remote-tools/durable-store.mjs",
24
+ "sha256": "4989ad74b81218278ed4c56fd36d591e121f81641f1e8af36bec415c965450a5"
25
+ },
26
+ {
27
+ "path": "packages/remote-tools/executor.mjs",
28
+ "sha256": "899f2f4b453e43197882c3b99d070fb5fae45f23af1dd2df6a065a2c6c8bc658"
29
+ },
30
+ {
31
+ "path": "packages/remote-tools/langchain.mjs",
32
+ "sha256": "d7582c8c464e925dc05f78d2ac60d31c09030d5b4dade1d6ca297618a6e52d49"
33
+ },
34
+ {
35
+ "path": "packages/remote-tools/LICENSE",
36
+ "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"
37
+ },
38
+ {
39
+ "path": "packages/remote-tools/LICENSING.md",
40
+ "sha256": "951f62c81b479190303d2d4a322c098f5ee39604a149b01455c29e3d9330c1de"
41
+ },
42
+ {
43
+ "path": "packages/remote-tools/NOTICE",
44
+ "sha256": "bfb2131be616bebf277cfcb08f3927c1c360e114f7e51e46a77b490bcbdef59a"
45
+ },
46
+ {
47
+ "path": "packages/remote-tools/README.md",
48
+ "sha256": "c5a80cf0cf066935877ae11cbe6c0faae7946924b82c5fa268faeaa013a666fd"
49
+ },
50
+ {
51
+ "path": "packages/remote-tools/recovery.mjs",
52
+ "sha256": "2325d0eba844035dd0b1bb95b07fd42ee0f7cf8f7a3f5114a079a41e32ba515c"
53
+ },
54
+ {
55
+ "path": "packages/remote-tools/THIRD-PARTY-NOTICES.md",
56
+ "sha256": "9fac1b22fd197ee70215fdf57f8bb198ff171acdfd1abba67b9a852362afdcff"
57
+ },
58
+ {
59
+ "path": "packages/remote-tools/validation.mjs",
60
+ "sha256": "f8c948416b1d3f65691c4b3756b0a1e53b348941c8f35dab9af3b233fbe460f8"
61
+ },
62
+ {
63
+ "path": "packages/remote-tools/wire.mjs",
64
+ "sha256": "a8f48acd040ade138de26303e05978425daf0e06551bd970a062fac8e0d09630"
65
+ },
66
+ {
67
+ "path": "examples/remote/native-consumer.mjs",
68
+ "sha256": "d608a7800179264a1ecf9f41d4055f5e02d44eb8f1817a9db2d654a492d67afb"
69
+ },
70
+ {
71
+ "path": "examples/remote/walkthrough.mjs",
72
+ "sha256": "b76985a42525a3930cf457a5cce483abd660d7731fc07b079181d2d5b0bb42d8"
73
+ }
74
+ ],
75
+ "buildInputs": [
76
+ {
77
+ "path": "tools/remote-build/build.mjs",
78
+ "sha256": "cad7305a0d936669970db6703fbaa923bb5c56e4b2e7f6227126c154362df09d"
79
+ },
80
+ {
81
+ "path": "tools/remote-build/templates/attempts.d.mts",
82
+ "sha256": "db1faf0f3e005cb62a3acd74500da358bea05c7834e28a0f55fcf65102be0b7b"
83
+ },
84
+ {
85
+ "path": "tools/remote-build/templates/attempts.mjs",
86
+ "sha256": "db1faf0f3e005cb62a3acd74500da358bea05c7834e28a0f55fcf65102be0b7b"
87
+ },
88
+ {
89
+ "path": "tools/remote-build/templates/consumer.mts",
90
+ "sha256": "2224097ad60293c11e503514e4d1c61558f5ffcd7a189de5653dfa94f8e51294"
91
+ },
92
+ {
93
+ "path": "tools/remote-build/templates/index.d.mts",
94
+ "sha256": "cb2ff52da7624e359dc5219af58ae12a6cadfff9bb5a567ce0871d5de073b5b3"
95
+ },
96
+ {
97
+ "path": "tools/remote-build/templates/index.mjs",
98
+ "sha256": "798e816691431e30f75aa4b920c21f24a1f0c429ab3663a1d9fa6791a5fd81a1"
99
+ },
100
+ {
101
+ "path": "tools/remote-build/templates/langchain.d.mts",
102
+ "sha256": "76bf0b24e94e072a3177524b47d71d7d558070c89ce6213bd24310ae40d8b9e8"
103
+ },
104
+ {
105
+ "path": "tools/remote-build/templates/local.d.mts",
106
+ "sha256": "b2637875a27143ac2407920749b965b8cc4ffa9e07696c524b4d249f1fcd1ace"
107
+ },
108
+ {
109
+ "path": "tools/remote-build/templates/local.mjs",
110
+ "sha256": "b2637875a27143ac2407920749b965b8cc4ffa9e07696c524b4d249f1fcd1ace"
111
+ },
112
+ {
113
+ "path": "tools/remote-build/templates/runtime.d.mts",
114
+ "sha256": "9a060069565874be8bfa01b2d622850e5e238f1e1956a878c0177d2c1238a606"
115
+ },
116
+ {
117
+ "path": "tools/remote-build/templates/runtime.mjs",
118
+ "sha256": "9a060069565874be8bfa01b2d622850e5e238f1e1956a878c0177d2c1238a606"
119
+ },
120
+ {
121
+ "path": "tools/sdk-build/tsconfig-core-0.3.json",
122
+ "sha256": "e284412668b8d64b8dd02510fd2d70e58538be5f48456e11797fe5136ebad3d6"
123
+ },
124
+ {
125
+ "path": "tools/sdk-build/package-lock.json",
126
+ "sha256": "7aa68fe1137c146d7bab4e43f086e0a401a723b4b0a7b7d7b530a7c609893f29"
127
+ }
128
+ ],
129
+ "strictJsonSha256": "efadbaf7513423e4c47360d33c1a6ff9b7bd2c300bf4c96fac4e561e940f369a",
130
+ "outputs": [
131
+ {
132
+ "path": "dist/remote-tools/attempts.d.mts",
133
+ "sha256": "db1faf0f3e005cb62a3acd74500da358bea05c7834e28a0f55fcf65102be0b7b"
134
+ },
135
+ {
136
+ "path": "dist/remote-tools/attempts.mjs",
137
+ "sha256": "db1faf0f3e005cb62a3acd74500da358bea05c7834e28a0f55fcf65102be0b7b"
138
+ },
139
+ {
140
+ "path": "dist/remote-tools/client.mjs",
141
+ "sha256": "4fe0bf01b46e9177fdf2ea15803b6c2457c05e0ba8008d3e7a96195bebf4d279"
142
+ },
143
+ {
144
+ "path": "dist/remote-tools/destination.mjs",
145
+ "sha256": "72e3057f1de34e83a4828c9ff4b21b1af4872fc1c224ac05d2f386d00e87bae6"
146
+ },
147
+ {
148
+ "path": "dist/remote-tools/durable-store.mjs",
149
+ "sha256": "4989ad74b81218278ed4c56fd36d591e121f81641f1e8af36bec415c965450a5"
150
+ },
151
+ {
152
+ "path": "dist/remote-tools/executor.mjs",
153
+ "sha256": "a9c16320c7c27c88d8bdd18e1302b2110dabf5385c4efd6884e5e80d2c9bf465"
154
+ },
155
+ {
156
+ "path": "dist/remote-tools/index.d.mts",
157
+ "sha256": "cb2ff52da7624e359dc5219af58ae12a6cadfff9bb5a567ce0871d5de073b5b3"
158
+ },
159
+ {
160
+ "path": "dist/remote-tools/index.mjs",
161
+ "sha256": "798e816691431e30f75aa4b920c21f24a1f0c429ab3663a1d9fa6791a5fd81a1"
162
+ },
163
+ {
164
+ "path": "dist/remote-tools/langchain.d.mts",
165
+ "sha256": "76bf0b24e94e072a3177524b47d71d7d558070c89ce6213bd24310ae40d8b9e8"
166
+ },
167
+ {
168
+ "path": "dist/remote-tools/langchain.mjs",
169
+ "sha256": "6b3a9083ec138b4c1e519b06440a706daac6b3f2a149a0e9ecaf3ece19187934"
170
+ },
171
+ {
172
+ "path": "dist/remote-tools/local.d.mts",
173
+ "sha256": "b2637875a27143ac2407920749b965b8cc4ffa9e07696c524b4d249f1fcd1ace"
174
+ },
175
+ {
176
+ "path": "dist/remote-tools/local.mjs",
177
+ "sha256": "b2637875a27143ac2407920749b965b8cc4ffa9e07696c524b4d249f1fcd1ace"
178
+ },
179
+ {
180
+ "path": "dist/remote-tools/recovery.mjs",
181
+ "sha256": "c7bd4ac6771f8344867061897e179c5d225d7a5db002276d148255fd9983d266"
182
+ },
183
+ {
184
+ "path": "dist/remote-tools/runtime.d.mts",
185
+ "sha256": "9a060069565874be8bfa01b2d622850e5e238f1e1956a878c0177d2c1238a606"
186
+ },
187
+ {
188
+ "path": "dist/remote-tools/runtime.mjs",
189
+ "sha256": "9a060069565874be8bfa01b2d622850e5e238f1e1956a878c0177d2c1238a606"
190
+ },
191
+ {
192
+ "path": "dist/remote-tools/strict-json.mjs",
193
+ "sha256": "efadbaf7513423e4c47360d33c1a6ff9b7bd2c300bf4c96fac4e561e940f369a"
194
+ },
195
+ {
196
+ "path": "dist/remote-tools/validation.mjs",
197
+ "sha256": "30fc4057944ef3ba5f914074131c535c4f8485611abfdfdae7829458155ab340"
198
+ },
199
+ {
200
+ "path": "dist/remote-tools/wire.mjs",
201
+ "sha256": "5be7ced92317e5a95ebe6acdcaf95172c8f89d10e4659b63400bc4389a202854"
202
+ }
203
+ ]
204
+ }
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/LICENSING.md ADDED
@@ -0,0 +1,7 @@
1
+ # License
2
+
3
+ Continuity code and documentation in this package are licensed under Apache 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
4
+
5
+ The optional framework and signing dependencies retain their own licenses. They are installed separately; their code is not bundled into this package. See [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
6
+
7
+ Apache 2.0 does not grant trademark rights beyond its stated terms.
package/NOTICE ADDED
@@ -0,0 +1,7 @@
1
+ Continuity
2
+ Copyright (c) 2026 Continuity contributors.
3
+
4
+ Continuity-authored code, specifications, documentation and
5
+ presentation assets are licensed under the Apache License, Version 2.0.
6
+ Third-party material retains its own license and attribution notices.
7
+ See THIRD-PARTY-NOTICES.md and LICENSING.md.
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # Continuity: let the work survive the worker
2
+
3
+ A worker can disappear while its request is still running. Its replacement needs to learn what happened without accidentally doing the job twice—or inheriting powers it was never given.
4
+
5
+ This package gives your application a cooperating tool service, an executor and a way to investigate unfinished work. The included service records synthetic local effects. It is a runnable evaluation, not a ready-made connector to a payment, ticketing or production security system.
6
+
7
+ ## Try it in a separate folder
8
+
9
+ Install this experimental preview from npm or the matching release archives. Use Node 22.18 or Node 24 and npm; no pnpm or TypeScript runtime setup is needed.
10
+
11
+ ```sh
12
+ mkdir continuity-example
13
+ cd continuity-example
14
+ npm init -y
15
+ npm install --ignore-scripts @ramex-labs/continuity-remote@0.3.0-preview.1
16
+ npm install --ignore-scripts viem@2.55.19
17
+ cp node_modules/@ramex-labs/continuity-remote/examples/walkthrough.mjs .
18
+ node walkthrough.mjs
19
+ ```
20
+
21
+ The walkthrough creates fresh disposable keys and a temporary case. It loses the reply after creating one synthetic ticket, revokes permission, and hands the investigation to a separately authorized replacement. The replacement retrieves the original report without sending the action again. Its final lines show `REVIEW_CLOSED`, duty record `OPEN`, and outside outcome `NOT_PROVEN`. Those distinctions are intentional: E6 closes the evidence review, not the attempt duty itself. Full duty discharge is not implemented in this preview; reviewing a report also does not prove that an outside job is finished.
22
+
23
+ No model subscription, API key, VM or chain is required. The example starts a service on `127.0.0.1`, then closes it and removes its temporary files. The base package depends on shared Core; viem is the walkthrough's signing helper.
24
+
25
+ ## Use it from your application
26
+
27
+ The main export provides:
28
+
29
+ | Method | Purpose |
30
+ | --- | --- |
31
+ | `createToolRegistry` | Define allowed tools and their exact arguments, permissions and resources. |
32
+ | `createCooperativeDestination` | Run the supplied local service with durable synthetic effects and signed results. |
33
+ | `createCooperativeClient` | Connect using the application's key and a pinned service key. |
34
+ | `createCooperativeExecutor` | Admit a bounded operation and ask the service to apply it. |
35
+ | `createCooperativeRecovery` | Look up or cancel an original attempt without sending it again. |
36
+ | `inspectDestinationLock`, `recoverDestinationLock` | Inspect and explicitly recover a dead local writer's exact lock. |
37
+
38
+ Owner setup lives under `/local`; signed runtime helpers under `/runtime`; report, duty and review methods under `/attempts`. JavaScript and TypeScript declarations are included. The package depends on exactly `@ramex-labs/continuity@0.3.0-preview.7`. It contains no engine copy. Core owns the shared rules; the remote package owns transport, service storage and tool integration. Its `/local`, `/runtime` and `/attempts` entries forward to Core. Every forwarded constructor is the identical Core function with the same default. Use `createLocalAttemptOwner` explicitly for attempt records.
39
+
40
+ The application fixes identities, keys, role, tool contracts and business keys. Agents supply only permitted arguments. Keep owner/client handles and provider credentials outside the agent's environment. This library alone does not sandbox an agent or block other network routes.
41
+
42
+ Budget enforcement requires an explicit `projection.amount` and `projection.unit` in the tool contract. An amount-typed argument without that projection is committed data only; it does not become a spending limit. Projected amounts use bigint values and a named unit. One registry accepts one amount unit. Grants spanning other registries must use compatible units; there is no currency conversion. Counterparties are signed identifiers, not independently verified people. A compensating tool needs separate permission and a retained applied source; it adds an action instead of erasing the original. Applications still define business uniqueness and whether more than one compensation is appropriate.
43
+
44
+ ## LangChain tools
45
+
46
+ Install the optional integration dependencies:
47
+
48
+ ```sh
49
+ npm install --ignore-scripts @langchain/core@1.2.12 zod@4.6.5
50
+ ```
51
+
52
+ After the application has created its registry and executor:
53
+
54
+ ```js
55
+ import {createContinuityTool} from '@ramex-labs/continuity-remote/langchain';
56
+
57
+ const tool = createContinuityTool({
58
+ registry, executor,
59
+ tool: 'ticket.create',
60
+ operationId: 'investigation:42:create-ticket',
61
+ businessKey: 'case:42:ticket',
62
+ });
63
+ const answer = await tool.invoke({title: 'Investigate a suspicious document'});
64
+ ```
65
+
66
+ This is an ordinary LangChain `DynamicStructuredTool`. To expose several operations together, use `createContinuityTools({registry, executor, operations})`; it refuses duplicate framework names. A trusted optional `name` distinguishes multiple bound operations using the same tool. Do not let a model invent a new operation ID to escape a refusal. LangChain's correlation ID is separate from the business operation.
67
+
68
+ Amount fields use exact decimal text at the JSON tool boundary and become bigint values after validation. No fractions, signs, exponents or rounding are accepted. The output's `lastReportedServiceState` is the latest received report, not a live guarantee about the destination. An uncertain result is a reason to investigate, not to resend.
69
+
70
+ The integration is tested through actual `.invoke()` calls without a paid model. This does not establish compatibility with every model provider's tool schema or a hostile agent deployment.
71
+
72
+ ## Recovery and limits
73
+
74
+ The destination acknowledges each new authority checkpoint. Only then does that update fence queued work remotely. Local revocation alone cannot undo an effect or instantly notify another machine. Any checkpoint change invalidates work prepared at an older head; this version deliberately provides no automatic refresh or redelivery.
75
+
76
+ `lookup(originalRequest)` is read-only. For an authenticated APPLIED report, its `observationAcknowledgment` can be passed to a separately authorized recorder’s `observe` method, even after the original worker retires. This records the report without restoring execution power. `cancel(originalRequest)` can retain a cancellation before application; `TOO_LATE` means the effect was already applied. `UNKNOWN` is not proof of no effect elsewhere. Results and business bindings are retained in bounded storage; exhaustion refuses new work instead of pruning them.
77
+
78
+ After a process crash, exact dead-PID lock recovery is available. Missing/corrupt state remains blocked. An older valid destination snapshot restored after shutdown cannot be detected by its unchanged identity marker. A separate monotonic anchor is needed before claiming protection against destination backup rollback. The clock and host filesystem are trusted.
79
+
80
+ Signed results identify which configured service made a claim. They do not establish outside truth. Only the synthetic local effect shares the service's atomic storage transaction. External APIs need their own idempotency, fencing and outcome contract. Non-loopback transport, production TLS/credential custody, hostile-process isolation and fresh remote Cedar/OpenFGA composition are outside this package's supported profile.
81
+
82
+ `createLocalOwner` retains E5; `createLocalReviewOwner` explicitly starts a fresh E6 history. Existing histories are not upgraded in place. E6 evidence reviews bind the complete current observation set and assignee. New evidence or reassignment requires a fresh review, while the business duty remains OPEN.
83
+
84
+ ## License
85
+
86
+ Apache 2.0; see [LICENSE](LICENSE), [NOTICE](NOTICE) and [third-party notices](THIRD-PARTY-NOTICES.md).
87
+
88
+ ## One Core, explicit history choices
89
+
90
+ In shared Core, `createLocalOwner` preserves the existing default policy. `createLocalAttemptOwner` explicitly starts an E5 history with attempt reports and duties; `createLocalReviewOwner` explicitly starts E6 with evidence review. Reopening a history preserves its recorded policy. No integration selects a new policy for an existing history. Use Core directly for authority and lifecycle; use this package for cooperating remote execution. The LangChain entry uses that same executor.
@@ -0,0 +1,7 @@
1
+ # Third-party dependencies
2
+
3
+ The base package uses Node built-ins and depends on the separately installed Apache-2.0 shared Core package. It contains no engine copy.
4
+
5
+ The optional LangChain entry uses separately installed `@langchain/core` 1.2.12 and `zod` 4.6.5, both MIT licensed. The walkthrough uses separately installed `viem` 2.55.19, also MIT licensed, to create disposable example signing keys. Their packages and transitive dependencies retain their own license files. No dependency code is copied into this archive.
6
+
7
+ The source build uses TypeScript 5.9.3 (Apache 2.0) and Node type declarations (MIT); those development tools are not included in the runtime package. Node is supplied separately under its own license.
@@ -0,0 +1 @@
1
+ export * from '@ramex-labs/continuity/attempts';
@@ -0,0 +1 @@
1
+ export * from '@ramex-labs/continuity/attempts';
@@ -0,0 +1,36 @@
1
+ import { randomBytes } from 'node:crypto';
2
+ import { capture, textId, hashId, encodeTransport, decodeTransport, canonicalDigest, signRequest, verifyResponse, MAX_WIRE_BYTES, publicKeyIdentity } from './wire.mjs';
3
+
4
+ /** Trusted application client. Transport failure never authorizes another effect. */
5
+ export function createCooperativeClient({url,serviceId,coordinatorPrivateKey,servicePublicKey,timeoutMs=2000}) {
6
+ const endpoint=new URL(url);
7
+ if(endpoint.protocol!=='http:'||endpoint.hostname!=='127.0.0.1'||!endpoint.port||endpoint.pathname!=='/'||
8
+ endpoint.username||endpoint.password||endpoint.search||endpoint.hash)throw Error('LOOPBACK_URL_REQUIRED');
9
+ textId(serviceId);publicKeyIdentity(servicePublicKey);publicKeyIdentity(coordinatorPrivateKey);
10
+ if(coordinatorPrivateKey.type!=='private'||servicePublicKey.type!=='public')throw Error('INVALID_KEY_ROLE');
11
+ if(!Number.isSafeInteger(timeoutMs)||timeoutMs<20||timeoutMs>10000)throw Error('INVALID_TIMEOUT');
12
+ const inspectResponse=(envelope,expectedDigest)=>{
13
+ hashId(expectedDigest);
14
+ const stable=capture(envelope);
15
+ const body=verifyResponse(stable,servicePublicKey,{serviceId,requestDigest:expectedDigest});
16
+ return capture({sequence:body.sequence,result:body.result,receipt:stable});
17
+ };
18
+ const call=async(operation,payload)=>{
19
+ const body=capture({version:'continuity-cooperative-request/1',serviceId,nonce:randomBytes(32).toString('hex'),operation,payload});
20
+ const envelope=signRequest(body,coordinatorPrivateKey),expectedDigest=canonicalDigest(body);
21
+ const response=await fetch(endpoint.origin+'/cooperative',{method:'POST',headers:{'content-type':'application/json'},
22
+ body:encodeTransport(envelope),redirect:'manual',signal:AbortSignal.timeout(timeoutMs)});
23
+ if(response.status!==200){await response.body?.cancel();throw Error('TRANSPORT_UNAVAILABLE');}
24
+ const parts=[];let length=0;
25
+ for await(const chunk of response.body??[]){length+=chunk.length;if(length>MAX_WIRE_BYTES)throw Error('RESPONSE_LIMIT');parts.push(chunk);}
26
+ return inspectResponse(decodeTransport(Buffer.concat(parts)),expectedDigest);
27
+ };
28
+ return Object.freeze({
29
+ checkpoint:events=>call('checkpoint',{events}),
30
+ prepare:operation=>call('prepare',{operation}),
31
+ commit:key=>call('commit',{key}),
32
+ status:key=>call('status',{key}),
33
+ cancel:key=>call('cancel',{key}),
34
+ inspectResponse,
35
+ });
36
+ }