@hraness/message-like-me 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/dist/agentic-messaging-v1.js +481 -25
- package/dist/cli.js +21197 -3527
- package/dist/ensoul-source-v1.js +4 -4
- package/dist/{cli-x1qncxm7.js → index-7dfvy41v.js} +4 -462
- package/dist/{cli-ththzwja.js → index-y1aec88m.js} +1 -5
- package/dist/index.js +4 -4
- package/dist/message-bundle-v1.js +580 -18
- package/dist/message-bundle-v2.js +639 -21
- package/docs/command-runtime.md +82 -0
- package/docs/effect-license.txt +21 -0
- package/package.json +6 -3
- package/dist/cli-bs3db5jr.js +0 -643
- package/dist/cli-d7qv38ab.js +0 -485
- package/dist/cli-ry4128kz.js +0 -584
- /package/dist/{cli-kw20gkk3.js → index-kw20gkk3.js} +0 -0
- /package/dist/{cli-qqafdvz9.js → index-qqafdvz9.js} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Command runtime and private publication
|
|
2
|
+
|
|
3
|
+
`runCommand(argv, io)` remains the Promise boundary used by the CLI. It runs one
|
|
4
|
+
Effect scope for a complete command. `command-program.ts` owns command ordering;
|
|
5
|
+
`CommandPlatform` supplies named native operations, the injected clock and output,
|
|
6
|
+
and scoped stores. A store exposes only declared operations, never the SQLite
|
|
7
|
+
handle. Each successful acquisition closes exactly once. Close failures preserve
|
|
8
|
+
the former `finally` precedence over a command failure.
|
|
9
|
+
|
|
10
|
+
All SQLite transaction callbacks remain synchronous. Ingestion, source overlap,
|
|
11
|
+
corpus revisions, HMAC identities, metrics, profile provenance, canonical digests,
|
|
12
|
+
and the versioned handoff contracts continue to use their existing domain code.
|
|
13
|
+
There is no parallel SQL mutation, network capability, agent invocation, message
|
|
14
|
+
sending, or retry added by this runtime.
|
|
15
|
+
|
|
16
|
+
Command programs declare their success, failure, and required services. Expected
|
|
17
|
+
failures retain the original error as a cause in the closed `CommandFailure`
|
|
18
|
+
union. Native adapters translate source-specific failures at the same boundaries
|
|
19
|
+
as before. The runtime has a narrow compatibility bridge for existing pure
|
|
20
|
+
validators that throw `CliError`; other defects remain defects. CLI text, stdout
|
|
21
|
+
formatting, diagnostics, and exit-code selection are unchanged.
|
|
22
|
+
|
|
23
|
+
## Publication and receipt recovery
|
|
24
|
+
|
|
25
|
+
A private file and its SQLite receipt are separate durable operations. A scope
|
|
26
|
+
owns a pending publication until the command explicitly retains it. Two-file
|
|
27
|
+
evaluation output retains both files only after both publications succeed. A
|
|
28
|
+
failure publishing the second file rolls back the first only when its custody
|
|
29
|
+
can still be proven; an existing second destination is never overwritten.
|
|
30
|
+
|
|
31
|
+
Study and handoff publication runs receipt recording and recovery without an
|
|
32
|
+
interruption boundary. If recording fails, a read-only exact-binding check reports
|
|
33
|
+
one of four states:
|
|
34
|
+
|
|
35
|
+
- `absent`: the receipt is absent, so cleanup may remove the owned publication.
|
|
36
|
+
- `committed`: the exact receipt exists; keep the publication.
|
|
37
|
+
- `different`: a receipt with that identity has different bindings; keep it.
|
|
38
|
+
- `unproven`: confirmation failed; keep it for inspection.
|
|
39
|
+
|
|
40
|
+
In particular, handoff recording may commit and then fail reading its audit. That
|
|
41
|
+
failure must not delete the handoff. An output-stream failure after a successful
|
|
42
|
+
receipt also leaves the publication intact. These paths preserve the original
|
|
43
|
+
CLI failure message and exit code. Internal callers can inspect
|
|
44
|
+
`PrivatePublicationError.publications` for immutable, body-free path and byte
|
|
45
|
+
digests, receipt state, and cleanup outcome. The report is not printed on stdout
|
|
46
|
+
and creates no retry authority.
|
|
47
|
+
|
|
48
|
+
Native publication creates an exclusive private staging file, syncs it, links it
|
|
49
|
+
without overwriting the destination, removes its own staging link, and syncs the
|
|
50
|
+
directory. Custody is held privately by the native adapter and is derived from
|
|
51
|
+
the created inode. Cleanup checks physical directory identity, ownership, modes,
|
|
52
|
+
link count, file identity, size, timestamps, and content digest. Digest reads use a
|
|
53
|
+
fixed-size buffer and stop at the captured size plus one byte, even if a file grows. It opens without
|
|
54
|
+
following symlinks and has no asynchronous yield between its final identity check
|
|
55
|
+
and unlink. Observed substitutions and unprovable state remain untouched.
|
|
56
|
+
|
|
57
|
+
This is not a filesystem-and-SQLite transaction or a kernel conditional unlink.
|
|
58
|
+
A separate process running as the same user can still race the final path check;
|
|
59
|
+
Effect and TypeScript do not remove that operating-system limitation. Directory
|
|
60
|
+
sync failures after removal are reported as `removed-unconfirmed`. The runtime
|
|
61
|
+
never claims that uncertain cleanup succeeded.
|
|
62
|
+
|
|
63
|
+
## Enforced architecture and distribution
|
|
64
|
+
|
|
65
|
+
`bun run check:effect` uses the repository's TypeScript compiler API and the
|
|
66
|
+
reviewed policy in `scripts/check-effect-architecture.ts`. Only `commands.ts`
|
|
67
|
+
may execute a runtime; native calls belong in `command-platform.ts` or
|
|
68
|
+
`command-artifacts.ts`. The checker rejects unclassified Effect modules,
|
|
69
|
+
floating Effects, erased channels, unsafe assertions, failure-discard shortcuts,
|
|
70
|
+
suppressions, and selected ambient I/O. Its paired fixtures cover common aliases.
|
|
71
|
+
It does not prove purity, linear lifetime safety, domain correctness, foreign
|
|
72
|
+
cancellation, or every possible JavaScript indirection. Consequential lifecycle,
|
|
73
|
+
publication, native-reader, and contract tests remain required.
|
|
74
|
+
|
|
75
|
+
Effect 3.22.1 is a pinned build dependency bundled into `dist/cli.js`; its
|
|
76
|
+
[MIT license](effect-license.txt) ships with the package. The five
|
|
77
|
+
public protocol JavaScript entries and their declaration graphs build separately
|
|
78
|
+
and expose no Effect dependency. `bun run check:public-graphs` verifies their
|
|
79
|
+
transitive built graphs. The full `bun run check` also keeps typecheck, all tests,
|
|
80
|
+
skill validation, the standalone privacy and local-only scan, fresh-build byte
|
|
81
|
+
comparison, and an isolated packed-consumer install. Release and synthetic
|
|
82
|
+
macOS gates remain governed by the existing publication runbook.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Effectful Technologies Inc
|
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hraness/message-like-me",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "A local-first CLI and Agent Skill for studying private messaging history and drafting messages that sound like you.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -77,11 +77,14 @@
|
|
|
77
77
|
"check:standalone": "bun scripts/check-standalone.ts",
|
|
78
78
|
"check:dist": "bun scripts/check-dist.ts",
|
|
79
79
|
"check:package": "bun scripts/package-smoke.ts",
|
|
80
|
-
"check": "bun run typecheck && bun run test && bun run check:skill && bun run check:standalone && bun run build && bun run check:dist && bun run check:package",
|
|
81
|
-
"prepack": "bun run check"
|
|
80
|
+
"check": "bun run typecheck && bun run check:effect && bun run test && bun run check:skill && bun run check:standalone && bun run build && bun run check:public-graphs && bun run check:dist && bun run check:package",
|
|
81
|
+
"prepack": "bun run check",
|
|
82
|
+
"check:effect": "bun scripts/check-effect-architecture.ts",
|
|
83
|
+
"check:public-graphs": "bun scripts/check-public-graphs.ts"
|
|
82
84
|
},
|
|
83
85
|
"devDependencies": {
|
|
84
86
|
"@types/bun": "1.3.14",
|
|
87
|
+
"effect": "3.22.1",
|
|
85
88
|
"sigstore": "4.1.1",
|
|
86
89
|
"typescript": "6.0.3"
|
|
87
90
|
}
|