@hasna/instructions 0.4.35 → 0.4.39
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/README.md +4 -2
- package/assets/skills/inbox/SKILL.md +86 -0
- package/dashboard/README.md +34 -70
- package/dist/cli/index.js +1136 -526
- package/dist/cli/raw-store-root.test.d.ts +2 -0
- package/dist/cli/raw-store-root.test.d.ts.map +1 -0
- package/dist/db/configs.d.ts.map +1 -1
- package/dist/generated/storage-kit/index.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1276 -754
- package/dist/lib/apply.d.ts.map +1 -1
- package/dist/lib/cursor-authority.d.ts +36 -3
- package/dist/lib/cursor-authority.d.ts.map +1 -1
- package/dist/lib/managed-skill-runtimes.d.ts +80 -0
- package/dist/lib/managed-skill-runtimes.d.ts.map +1 -0
- package/dist/lib/managed-skill-runtimes.test.d.ts +2 -0
- package/dist/lib/managed-skill-runtimes.test.d.ts.map +1 -0
- package/dist/lib/raw-store-root.d.ts +17 -0
- package/dist/lib/raw-store-root.d.ts.map +1 -0
- package/dist/lib/session-apply.d.ts.map +1 -1
- package/dist/lib/session-authority.d.ts +27 -0
- package/dist/lib/session-authority.d.ts.map +1 -0
- package/dist/lib/session-authority.test.d.ts +2 -0
- package/dist/lib/session-authority.test.d.ts.map +1 -0
- package/dist/lib/session-render.d.ts +5 -3
- package/dist/lib/session-render.d.ts.map +1 -1
- package/dist/mcp/index.js +290 -233
- package/dist/server/index.js +425 -231
- package/dist/status.d.ts +11 -1
- package/dist/status.d.ts.map +1 -1
- package/dist/storage/cloud-store.d.ts.map +1 -1
- package/dist/storage/cloud-store.test.d.ts +2 -0
- package/dist/storage/cloud-store.test.d.ts.map +1 -0
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ envelope. Its top-level fields are `configs`, `profiles`, `drift`, `secrets`,
|
|
|
62
62
|
|
|
63
63
|
`instructions package-manager-scan` blocks package-manager credential ingress without
|
|
64
64
|
printing credential values. It scans repo `.npmrc` files, home `.npmrc`, Bun
|
|
65
|
-
config, lockfiles, and shell profiles, then reports only path, line, rule,
|
|
65
|
+
config, lockfiles, and shell profiles, then reports only the path, line, rule,
|
|
66
66
|
surface, and tracked status.
|
|
67
67
|
|
|
68
68
|
Use it in CI or pre-commit hooks:
|
|
@@ -169,7 +169,9 @@ concern (`instructions-serve`), selected by `HASNA_INSTRUCTIONS_DATABASE_URL`.
|
|
|
169
169
|
|
|
170
170
|
## Data Directory
|
|
171
171
|
|
|
172
|
-
Local data
|
|
172
|
+
Local data (the SQLite store and backups) lives under the canonical data root
|
|
173
|
+
`~/.hasna/instructions/` by default. `HASNA_CONFIGS_HOME` remains a supported
|
|
174
|
+
override of the root for legacy setups.
|
|
173
175
|
|
|
174
176
|
## Session Instruction Rendering
|
|
175
177
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inbox
|
|
3
|
+
description: Arm and verify the package-owned Conversations watcher for direct messages and subscribed channels.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Inbox
|
|
7
|
+
|
|
8
|
+
Use the maintained `@hasna/conversations` surfaces. There is no separate
|
|
9
|
+
`inbox` executable to install or copy.
|
|
10
|
+
|
|
11
|
+
## Prepare the subscriptions
|
|
12
|
+
|
|
13
|
+
Subscribe the session identity to every channel that can change its work:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
conversations channel subscribe <channel> --from <agent> --preview-chars 320
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Read the subscriptions back before arming:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
conversations channel subscriptions --from <agent> --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The readback must contain the intended, non-empty channel set. Each row must
|
|
26
|
+
carry a seeded `since_message_id`, so the first watch cycle starts from the
|
|
27
|
+
subscription baseline instead of replaying history.
|
|
28
|
+
|
|
29
|
+
## Arm the watcher
|
|
30
|
+
|
|
31
|
+
First prove the hosted heartbeat path works:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
conversations agents heartbeat --from <agent> --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Only after that command succeeds, arm:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
conversations watch --from <agent> --all --interval 60000 --full-content
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`--all` watches direct messages plus every subscribed channel. Several
|
|
44
|
+
comma-separated identities may be supplied to `--from`; reads are the union
|
|
45
|
+
and the first identity is primary for writes.
|
|
46
|
+
|
|
47
|
+
The watcher reports repeated poll failures as `DEGRADED` and announces
|
|
48
|
+
`RECOVERED` after a successful poll. Treat those lines as visibility state,
|
|
49
|
+
not as message content.
|
|
50
|
+
|
|
51
|
+
## Manual fallback when hosted watch is degraded
|
|
52
|
+
|
|
53
|
+
If the heartbeat command fails, do not claim the watcher is armed. Keep the
|
|
54
|
+
subscription baseline and use bounded manual reads until the hosted path is
|
|
55
|
+
healthy:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
conversations digest <channel> --since <ISO8601> --json
|
|
59
|
+
conversations digest --to <agent> --since <ISO8601> --json
|
|
60
|
+
conversations blockers --from <agent> --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Page every digest through `has_more` and `next_cursor`. Preserve the newest
|
|
64
|
+
successfully read timestamp or cursor between coordination passes. A manual
|
|
65
|
+
read is degraded service: say so explicitly, schedule the next bounded pass,
|
|
66
|
+
and do not describe it as a live monitor.
|
|
67
|
+
|
|
68
|
+
## Verify delivery, not just process lifetime
|
|
69
|
+
|
|
70
|
+
Have a different agent send one uniquely labelled canary to a subscribed
|
|
71
|
+
channel and one direct message. The watcher must surface both within one poll
|
|
72
|
+
interval. A running process, successful subscription write, or quiet first
|
|
73
|
+
poll alone does not prove delivery.
|
|
74
|
+
|
|
75
|
+
After both canaries arrive, record the local runtime gate:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
instructions managed-skills status --from <agent> --delivery-verified --json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`--delivery-verified` is an evidence assertion, not a probe. Use it only in the
|
|
82
|
+
same acceptance pass that observed both canaries.
|
|
83
|
+
|
|
84
|
+
`conversations watch` does not monitor Todos assignments. If the session also
|
|
85
|
+
needs task-assignment awareness, keep that as a separate bounded Todos read;
|
|
86
|
+
do not add another Conversations wrapper or executable.
|
package/dashboard/README.md
CHANGED
|
@@ -1,73 +1,37 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
This
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
32
|
-
|
|
33
|
-
// Other configs...
|
|
34
|
-
],
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
1
|
+
# Instructions dashboard (legacy API client)
|
|
2
|
+
|
|
3
|
+
This directory contains a React/Vite dashboard with pages for configs,
|
|
4
|
+
profiles, apply/sync, snapshots, and machines. Its checked-in API client uses
|
|
5
|
+
the former unauthenticated local `/api/*` routes at
|
|
6
|
+
`http://localhost:3457`.
|
|
7
|
+
|
|
8
|
+
Current `instructions-serve` exposes authenticated `/v1/*` and deliberately
|
|
9
|
+
does not mount `/api/*`. As a result, this dashboard is not operational against
|
|
10
|
+
the current server until its client, response shapes, and authentication are
|
|
11
|
+
migrated to `/v1`. The server may still serve `dashboard/dist` as static files
|
|
12
|
+
when a build is present; serving the assets does not restore the old API.
|
|
13
|
+
|
|
14
|
+
## Source layout
|
|
15
|
+
|
|
16
|
+
- `src/api.ts` — fixed-base legacy `/api` client.
|
|
17
|
+
- `src/pages/ConfigsPage.tsx` — search, inspect, and edit config content.
|
|
18
|
+
- `src/pages/ProfilesPage.tsx` — create, inspect, preview, and apply profiles.
|
|
19
|
+
- `src/pages/ApplyPage.tsx` — preview/apply configs and legacy directory sync.
|
|
20
|
+
- `src/pages/HistoryPage.tsx` — inspect config snapshots.
|
|
21
|
+
- `src/pages/MachinesPage.tsx` — machine and category statistics.
|
|
22
|
+
|
|
23
|
+
## Development
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
bun install
|
|
27
|
+
bun run dev
|
|
28
|
+
bun run lint
|
|
29
|
+
bun run build
|
|
44
30
|
```
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// eslint.config.js
|
|
50
|
-
import reactX from 'eslint-plugin-react-x'
|
|
51
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
32
|
+
The Vite dev server alone does not provide API endpoints. For UI work before
|
|
33
|
+
the `/v1` migration, use a purpose-built mock or a compatible legacy server;
|
|
34
|
+
do not expose an unauthenticated `/api` shim in production.
|
|
52
35
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
files: ['**/*.{ts,tsx}'],
|
|
57
|
-
extends: [
|
|
58
|
-
// Other configs...
|
|
59
|
-
// Enable lint rules for React
|
|
60
|
-
reactX.configs['recommended-typescript'],
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
73
|
-
```
|
|
36
|
+
See the repository's [HTTP API reference](../docs/http-api.md) for the current
|
|
37
|
+
server contract.
|