@codyswann/lisa 2.169.0 → 2.170.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 (57) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  4. package/plugins/lisa-agy/plugin.json +1 -1
  5. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  6. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  7. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  8. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  9. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  12. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-expo-agy/plugin.json +1 -1
  15. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-harper-fabric/skills/harper-auth/SKILL.md +320 -0
  20. package/plugins/lisa-harper-fabric/skills/harper-auth/agents/openai.yaml +4 -0
  21. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  22. package/plugins/lisa-harper-fabric-agy/skills/harper-auth/SKILL.md +320 -0
  23. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-harper-fabric-copilot/skills/harper-auth/SKILL.md +320 -0
  25. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-harper-fabric-cursor/skills/harper-auth/SKILL.md +320 -0
  27. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  30. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  35. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  40. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-rails-agy/plugin.json +1 -1
  45. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  50. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  55. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/src/harper-fabric/skills/harper-auth/SKILL.md +320 -0
package/package.json CHANGED
@@ -85,7 +85,7 @@
85
85
  "lodash": ">=4.18.1"
86
86
  },
87
87
  "name": "@codyswann/lisa",
88
- "version": "2.169.0",
88
+ "version": "2.170.0",
89
89
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
90
90
  "main": "dist/index.js",
91
91
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -0,0 +1,320 @@
1
+ ---
2
+ name: harper-auth
3
+ description: This skill should be used when adding or debugging Harper (HarperDB/Fabric) authentication and authorization - roles.yaml, user and role Operations API calls, Basic auth, JWT operation tokens, exported-resource permissions, and Resource context.user checks. Pairs with harper-config-yaml, harper-resources, harper-rest-queries, and harper-operations.
4
+ ---
5
+
6
+ # Harper Auth
7
+
8
+ ## Overview
9
+
10
+ Harper uses role-based access control. Every user has one role, and that role
11
+ decides which databases, tables, attributes, and operations the user can access.
12
+ Use declarative `roles.yaml` for application-owned roles and the Operations API
13
+ for environment-owned users, password changes, role audits, and token issuance.
14
+
15
+ Cross-check extension wiring in [[harper-config-yaml]] before editing roles:
16
+ custom `config.yaml` files replace Harper's default config, so `roles` must be
17
+ re-declared alongside `rest`, `graphqlSchema`, and `jsResource` when the app needs
18
+ all of them. Cross-check endpoint/resource behavior in [[harper-resources]] and
19
+ query filters in [[harper-rest-queries]].
20
+
21
+ ## Role model
22
+
23
+ Harper has built-in roles and custom roles:
24
+
25
+ | Role type | Use it for | Notes |
26
+ | --- | --- | --- |
27
+ | `super_user` | Operators, deploy automation, emergency admin work | Full access to operations and data. Do not use for app clients. |
28
+ | `structure_user` | Schema/database administration without full data access | Scope narrowly when used; normal app users usually should not need it. |
29
+ | Custom role | Application clients, readers, editors, service accounts | Permissions are explicit. Missing database/table entries mean no access. |
30
+
31
+ Prefer least-privilege custom roles for application traffic. A public read client,
32
+ an editor/admin client, and a deploy/operator client should normally be separate
33
+ users with separate roles.
34
+
35
+ ## Enable role files
36
+
37
+ Keep roles in the component root, typically `harper-app/roles.yaml`, and enable
38
+ the built-in `roles` extension in `harper-app/config.yaml`:
39
+
40
+ ```yaml
41
+ rest: true
42
+ graphqlSchema:
43
+ files: 'schema.graphql'
44
+ roles:
45
+ files: 'roles.yaml'
46
+ jsResource:
47
+ files: 'resources.js'
48
+ ```
49
+
50
+ Because `config.yaml` is not merged with Harper's defaults, keep every extension
51
+ the component needs in this file. Removing `roles` silently stops role-file
52
+ reconciliation; removing `rest` or `jsResource` can make the secured endpoint
53
+ disappear while the role still exists.
54
+
55
+ ## Declare roles in `roles.yaml`
56
+
57
+ Use `roles.yaml` for roles that should be versioned with the app. On startup,
58
+ Harper creates missing declared roles and updates existing declared roles to match
59
+ the file.
60
+
61
+ Example: public readers can read orders, but only admins can write:
62
+
63
+ ```yaml
64
+ public_reader:
65
+ super_user: false
66
+ app:
67
+ Orders:
68
+ read: true
69
+ insert: false
70
+ update: false
71
+ delete: false
72
+ attributes:
73
+ id:
74
+ read: true
75
+ status:
76
+ read: true
77
+ publicTotal:
78
+ read: true
79
+
80
+ order_admin:
81
+ super_user: false
82
+ app:
83
+ Orders:
84
+ read: true
85
+ insert: true
86
+ update: true
87
+ delete: false
88
+ attributes:
89
+ internalNotes:
90
+ read: true
91
+ insert: true
92
+ update: true
93
+ ```
94
+
95
+ Rules:
96
+
97
+ - Database keys such as `app` must match the database names in `schema.graphql`.
98
+ - Table keys such as `Orders` must match the table type names, not necessarily the
99
+ exported REST path.
100
+ - Table-level `read`, `insert`, `update`, and `delete` are the outer gate.
101
+ - Attribute permissions narrow field-level access. They cannot grant a capability
102
+ that the table-level permission denies.
103
+ - If a database or table is omitted from the role, that role has no access to it.
104
+
105
+ Use role files for stable app permissions. Use Operations API calls when changing
106
+ users, rotating credentials, or inspecting what the deployed system actually has.
107
+
108
+ ## Manage users and roles with Operations API
109
+
110
+ User and role mutations require a `super_user` caller. Send JSON `POST` requests
111
+ to the Operations API, usually port `9925` locally:
112
+
113
+ ```bash
114
+ curl -sS http://localhost:9925/ \
115
+ -u "$HARPER_USERNAME:$HARPER_PASSWORD" \
116
+ -H 'Content-Type: application/json' \
117
+ --data '{"operation":"list_roles"}'
118
+ ```
119
+
120
+ Create a user for a declared role:
121
+
122
+ ```bash
123
+ curl -sS http://localhost:9925/ \
124
+ -u "$HARPER_USERNAME:$HARPER_PASSWORD" \
125
+ -H 'Content-Type: application/json' \
126
+ --data '{
127
+ "operation": "add_user",
128
+ "username": "public-client",
129
+ "password": "replace-with-generated-secret",
130
+ "role": "public_reader",
131
+ "active": true
132
+ }'
133
+ ```
134
+
135
+ Change a user's role or password:
136
+
137
+ ```bash
138
+ curl -sS http://localhost:9925/ \
139
+ -u "$HARPER_USERNAME:$HARPER_PASSWORD" \
140
+ -H 'Content-Type: application/json' \
141
+ --data '{
142
+ "operation": "alter_user",
143
+ "username": "public-client",
144
+ "role": "order_admin",
145
+ "active": true
146
+ }'
147
+ ```
148
+
149
+ Remove a user before removing a role:
150
+
151
+ ```bash
152
+ curl -sS http://localhost:9925/ \
153
+ -u "$HARPER_USERNAME:$HARPER_PASSWORD" \
154
+ -H 'Content-Type: application/json' \
155
+ --data '{"operation":"drop_user","username":"public-client"}'
156
+ ```
157
+
158
+ Avoid committing real passwords, tokens, or generated secrets. For local examples,
159
+ use environment variables or throwaway development credentials.
160
+
161
+ ## Basic auth and JWT operation tokens
162
+
163
+ Harper accepts Basic auth for Operations API and secured REST calls:
164
+
165
+ ```bash
166
+ curl -i http://localhost:9926/app/orders/ \
167
+ -u "$PUBLIC_USERNAME:$PUBLIC_PASSWORD"
168
+ ```
169
+
170
+ For clients that should not send Basic auth on every request, create JWT tokens
171
+ with `create_authentication_tokens`. This operation is intentionally unauthenticated
172
+ but requires the target username and password:
173
+
174
+ ```bash
175
+ tokens="$(
176
+ curl -sS http://localhost:9925/ \
177
+ -H 'Content-Type: application/json' \
178
+ --data '{
179
+ "operation": "create_authentication_tokens",
180
+ "username": "'"$PUBLIC_USERNAME"'",
181
+ "password": "'"$PUBLIC_PASSWORD"'"
182
+ }'
183
+ )"
184
+
185
+ operation_token="$(jq -r '.operation_token' <<<"$tokens")"
186
+ refresh_token="$(jq -r '.refresh_token' <<<"$tokens")"
187
+ ```
188
+
189
+ Use the operation token as a bearer token:
190
+
191
+ ```bash
192
+ curl -i http://localhost:9926/app/orders/ \
193
+ -H "Authorization: Bearer $operation_token"
194
+ ```
195
+
196
+ Refresh an expired operation token with the refresh token:
197
+
198
+ ```bash
199
+ curl -sS http://localhost:9925/ \
200
+ -H 'Content-Type: application/json' \
201
+ -H "Authorization: Bearer $refresh_token" \
202
+ --data '{"operation": "refresh_operation_token"}'
203
+ ```
204
+
205
+ Treat operation tokens and refresh tokens as credentials. Never log them, commit
206
+ them, paste them into tickets, or store them in browser-accessible app config.
207
+
208
+ ## Exported resources and `context.user`
209
+
210
+ Exported tables and custom Resources inherit the caller's role permissions.
211
+ If a role cannot read or write the underlying table, Harper should deny the REST
212
+ or GraphQL request before app logic treats it as successful.
213
+
214
+ Use custom Resource checks when the rule depends on request identity, tenant
215
+ ownership, or business state that is not expressible in `roles.yaml`:
216
+
217
+ ```javascript
218
+ export class Orders extends tables.Orders {
219
+ static async post(target, data, context) {
220
+ const user = context.user;
221
+ if (!user) {
222
+ const error = new Error('Authentication required');
223
+ error.statusCode = 401;
224
+ throw error;
225
+ }
226
+
227
+ if (user.role !== 'order_admin') {
228
+ const error = new Error('Forbidden');
229
+ error.statusCode = 403;
230
+ throw error;
231
+ }
232
+
233
+ return super.post(target, await data, context);
234
+ }
235
+ }
236
+ ```
237
+
238
+ Pass `context` through when delegating to tables or other resources:
239
+
240
+ ```javascript
241
+ await tables.OrderEvents.post(
242
+ target,
243
+ {
244
+ orderId,
245
+ type: 'created',
246
+ createdBy: context.user?.username,
247
+ },
248
+ context,
249
+ );
250
+ ```
251
+
252
+ Guidance:
253
+
254
+ - Use `roles.yaml` for coarse table/attribute access and Resource logic for
255
+ request-specific policy.
256
+ - Do not trust client-provided role, user id, tenant id, or permission claims.
257
+ Read identity from `context.user`.
258
+ - Do not put `context` in module-level state; it belongs to one request.
259
+ - Do not use `requestWithoutAuthentication` for normal application routes. If a
260
+ webhook must bypass Harper auth, verify its signature first and keep its table
261
+ writes narrowly scoped.
262
+
263
+ ## Verification matrix
264
+
265
+ Run the local app, create the test users, and check unauthenticated, reader, and
266
+ admin behavior against the same endpoint:
267
+
268
+ ```bash
269
+ harper dev harper-app
270
+
271
+ # Unauthenticated request should be denied.
272
+ curl -i http://localhost:9926/app/orders/
273
+
274
+ # Reader can read.
275
+ curl -i http://localhost:9926/app/orders/ \
276
+ -u "$PUBLIC_USERNAME:$PUBLIC_PASSWORD"
277
+
278
+ # Reader cannot write.
279
+ curl -i -X POST http://localhost:9926/app/orders/ \
280
+ -u "$PUBLIC_USERNAME:$PUBLIC_PASSWORD" \
281
+ -H 'Content-Type: application/json' \
282
+ --data '{"id":"ord_1","status":"new"}'
283
+
284
+ # Admin can write.
285
+ curl -i -X POST http://localhost:9926/app/orders/ \
286
+ -u "$ADMIN_USERNAME:$ADMIN_PASSWORD" \
287
+ -H 'Content-Type: application/json' \
288
+ --data '{"id":"ord_1","status":"new"}'
289
+ ```
290
+
291
+ Expected results:
292
+
293
+ | Caller | Read | Write |
294
+ | --- | --- | --- |
295
+ | No credentials | `401` or auth denial | `401` or auth denial |
296
+ | `public_reader` | `200` | `403` or permission denial |
297
+ | `order_admin` | `200` | `200` or expected validation response |
298
+
299
+ Also verify metadata with a restricted user when debugging permissions:
300
+
301
+ ```bash
302
+ curl -sS http://localhost:9925/ \
303
+ -u "$PUBLIC_USERNAME:$PUBLIC_PASSWORD" \
304
+ -H 'Content-Type: application/json' \
305
+ --data '{"operation":"user_info"}'
306
+ ```
307
+
308
+ If the status code is unexpected, check in this order:
309
+
310
+ 1. `config.yaml` still enables `roles`, `rest`, `graphqlSchema`, and `jsResource`.
311
+ 2. `roles.yaml` database/table names match the schema.
312
+ 3. The user is active and assigned to the intended role.
313
+ 4. The route being tested is the exported table/resource path you meant to secure.
314
+ 5. Resource code passes `context` through to `super` and nested table calls.
315
+
316
+ ## Sources
317
+
318
+ - [Users & Roles Configuration](https://docs.harperdb.io/reference/v5/users-and-roles/configuration)
319
+ - [Operations Reference](https://docs.harperdb.io/reference/v5/operations-api/operations)
320
+ - [Components Overview](https://docs.harperdb.io/reference/v5/components/overview)
@@ -0,0 +1,4 @@
1
+ display_name: "Harper Auth"
2
+ short_description: "adding or debugging Harper (HarperDB/Fabric) authentication and authorization - roles.yaml, user and role Operations API calls, Basic auth…"
3
+ default_prompt:
4
+ - "Use $harper-auth: adding or debugging Harper (HarperDB/Fabric) authentication and authorization - roles.yaml, user and role Operations API calls, Basic auth…."
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.169.0",
3
+ "version": "2.170.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"