@lawaty/lacode 1.0.3 → 1.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.
- package/CHANGELOG.md +55 -0
- package/README.md +25 -6
- package/dist/agents.js +368 -244
- package/dist/commands.js +29 -13
- package/dist/index.js +1170 -403
- package/dist/lacode.js +23 -2
- package/docs/CONTEXT.md +80 -10
- package/docs/INSTALL.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,61 @@ All notable changes to LaCode are recorded here. The format follows
|
|
|
7
7
|
Versions come from git release commits; the npm version is bumped in the same
|
|
8
8
|
commit as the changelog entry it describes.
|
|
9
9
|
|
|
10
|
+
## [1.1.0] — a map contract, feedback, and host credential sync
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **A one-time feedback hint, the `lacode feedback` command, and GitHub issue
|
|
15
|
+
templates.** The hint is local only: no telemetry, no analytics, and it sends
|
|
16
|
+
nothing anywhere. It shows at most once, only when a TUI sink exists, and a
|
|
17
|
+
toast that fails does not consume it. Opt out with `feedbackHint: false` or
|
|
18
|
+
`LACODE_NO_FEEDBACK_HINT=1`; the flag is
|
|
19
|
+
`~/.local/share/opencode/lacode/feedback.json`.
|
|
20
|
+
- **The post-publish host sync now syncs provider credentials.** After
|
|
21
|
+
`npm publish`, `scripts/sync-hosts.mjs` copies the allowlisted providers from
|
|
22
|
+
the local opencode auth store (`OC_AUTH_PROVIDERS`, default
|
|
23
|
+
`opencode-go opencode`) to each host, keeps host-only providers, and writes
|
|
24
|
+
the remote `auth.json` atomically with a timestamped backup.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **The context map has one entry schema, a per-file budget and a per-file
|
|
29
|
+
lifecycle.** Every navigation entry is a provenance marker (`[binding]`,
|
|
30
|
+
`[provisional]` or `[disputed]`), a rule of at most three non-blank lines, and
|
|
31
|
+
a `— See <path>[ §Section] (verified YYYY-MM-DD)` pointer. No Context /
|
|
32
|
+
Decision / Consequences / Alternatives blocks. Every file has a hard cap in
|
|
33
|
+
non-blank lines (architecture 150, contexts 200, conventions 150, workflows
|
|
34
|
+
150, decisions 120, active 60). The 30-day provisional window generalises the
|
|
35
|
+
active backlog's 7-day finished-task window; binding and disputed entries are
|
|
36
|
+
exempt, and an entry whose source is gone is never auto-dropped.
|
|
37
|
+
- **The prompt now lives in `src/lib/cartographer-prompt.ts`,** with the tracked
|
|
38
|
+
copy at `.opencode/prompts/context.txt`; a test pins equality so a reviewer
|
|
39
|
+
reads the text the model actually runs.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **`LACODE_SYNC_DRY_RUN=1` no longer contacts a host.** It used to print the
|
|
44
|
+
plan and then SSH to every host to exercise the credential helper when a local
|
|
45
|
+
auth store existed, which sent provider credentials during a “dry run”. It now
|
|
46
|
+
reads only the local plan and prints the auth summary; no SSH and no `npm view`.
|
|
47
|
+
- **The post-publish host sync accepts a real `opencode.jsonc`.** Comments and
|
|
48
|
+
trailing commas no longer make a host fail as “config not normalized
|
|
49
|
+
(unparseable)”.
|
|
50
|
+
- **A constraints file is no longer a deliberation ledger.** `decisions.md` is
|
|
51
|
+
capped, decision-record blocks are a schema violation, and the prompt tells
|
|
52
|
+
the cartographer to state the constraint and point at the page that owns it.
|
|
53
|
+
- **Restatement and drift are now reported instead of silently trusted.** After
|
|
54
|
+
every run the map is audited for dangling paths/sections, a numeric claim
|
|
55
|
+
absent from its cited source, a possible negation conflict, a source modified
|
|
56
|
+
after `verified`, tables/fenced blocks/verbatim spans, duplicate rules,
|
|
57
|
+
archive-of-record language and charter degeneration. The audit is
|
|
58
|
+
**report-only**: it never rewrites a claim and never deletes content with no
|
|
59
|
+
source, because the map may be the only copy and the page may be the stale
|
|
60
|
+
side. A failure is a loud `context map validation failed` error.
|
|
61
|
+
- **The lifecycle no longer belongs to one file.** `active.md` still uses its
|
|
62
|
+
seven-day finished-task window; every other file now expires provisional
|
|
63
|
+
entries after 30 days, and only when the cited source still resolves.
|
|
64
|
+
|
|
10
65
|
## [1.0.3] — one notification even when the plugin is loaded twice
|
|
11
66
|
|
|
12
67
|
### Fixed
|
package/README.md
CHANGED
|
@@ -104,6 +104,23 @@ In a repository with no `.opencode/context/` yet, the first session builds it in
|
|
|
104
104
|
the background; `/context-init` forces it, and [Context map](#context-map)
|
|
105
105
|
explains what it is for.
|
|
106
106
|
|
|
107
|
+
## Feedback
|
|
108
|
+
|
|
109
|
+
The feedback path has no telemetry and no analytics — it sends nothing anywhere
|
|
110
|
+
— but I would still like to hear from you.
|
|
111
|
+
|
|
112
|
+
- **Bug or feature request?** [Open an issue](https://github.com/lawaty/lacode/issues).
|
|
113
|
+
- **Question, or want to say how you use it?** [Start a discussion](https://github.com/lawaty/lacode/discussions).
|
|
114
|
+
- **Found it useful?** A ⭐ on [the repo](https://github.com/lawaty/lacode) helps
|
|
115
|
+
other people find it.
|
|
116
|
+
|
|
117
|
+
`lacode feedback` prints both links. The one-time hint that points at the issue
|
|
118
|
+
tracker is opt-out: set `feedbackHint: false` in the plugin options, or
|
|
119
|
+
`LACODE_NO_FEEDBACK_HINT=1` in the environment. It is shown at most once, only
|
|
120
|
+
when there is a TUI to show it in; piped, CI and test runs leave the flag
|
|
121
|
+
untouched. A toast that fails does not consume the note, so a later interactive
|
|
122
|
+
run can still show it.
|
|
123
|
+
|
|
107
124
|
## Configure
|
|
108
125
|
|
|
109
126
|
Plugin options are a tuple — the package name, then an options object. Every
|
|
@@ -133,6 +150,7 @@ option is optional:
|
|
|
133
150
|
| `reapMs` | `30000` | Hang-reaper interval. |
|
|
134
151
|
| `probeMs` | `900000` | How often benched models are checked by actually using them. `0` turns the periodic check off and leaves the `pool_recheck` tool as the only way to ask. |
|
|
135
152
|
| `selfUpdate` | `true` | Check for a newer release at most once per ~6h and install it in the background; it applies on the next opencode start. `false` — or `LACODE_NO_SELFUPDATE=1` — turns the check off. |
|
|
153
|
+
| `feedbackHint` | `true` | Show the one-time feedback note on the first interactive run. `false` — or `LACODE_NO_FEEDBACK_HINT=1` — turns it off. The flag lives in `~/.local/share/opencode/lacode/feedback.json`; nothing is sent anywhere. |
|
|
136
154
|
| `sound` | `true` | Play a short tone with each notification, one per outcome, so you can tell a finished session from a question or a permission prompt without reading the popup. It is opt-out: `false` — or `LACODE_SOUND=0` (`false`, `off`, `no` work too, and beat the option) — turns the sound off, and anything else, a typo included, leaves it on. |
|
|
137
155
|
| `omniroute` | — | Optional [OmniRoute](docs/OMNIROUTE.md) gateway integration. Absent or `{ enabled: false }` changes nothing. |
|
|
138
156
|
| `watchMs` | `1000` | How often the pool files are checked for changes. `0` disables live reload. |
|
|
@@ -393,12 +411,13 @@ and **Deny**, and macOS gets a plain notice without buttons.
|
|
|
393
411
|
`lacode forward HOST -- COMMAND` runs a command on another host over ssh and
|
|
394
412
|
exits with its status.
|
|
395
413
|
|
|
396
|
-
The full CLI is `notify`, `forward`, `doctor`, `version`, `update`,
|
|
397
|
-
and `tunnel setup`. `version` reports which copy of LaCode is running —
|
|
398
|
-
whether opencode is loading that same copy — and `update [--check]` refreshes
|
|
399
|
-
installed one. `
|
|
400
|
-
|
|
401
|
-
|
|
414
|
+
The full CLI is `notify`, `forward`, `doctor`, `feedback`, `version`, `update`,
|
|
415
|
+
`receive` and `tunnel setup`. `version` reports which copy of LaCode is running —
|
|
416
|
+
and whether opencode is loading that same copy — and `update [--check]` refreshes
|
|
417
|
+
an installed one. `feedback` prints the Issues and Discussions links; it opens
|
|
418
|
+
nothing and sends nothing. `receive` is the desktop end of the tunnel (the forced
|
|
419
|
+
command a remote key is restricted to) and `tunnel setup` provisions the key and
|
|
420
|
+
the forward.
|
|
402
421
|
|
|
403
422
|
Configuration, the payload format, the receiver contract and holding the forward
|
|
404
423
|
open are in [docs/TUNNEL.md](docs/TUNNEL.md).
|