vine-context 0.0.1 → 0.1.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.
Files changed (34) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +279 -3
  3. package/dist/apps/shell.html +149 -0
  4. package/dist/apps/views.html +144 -0
  5. package/dist/cli.js +7825 -0
  6. package/dist/cli.js.map +1 -0
  7. package/examples/data/graphs/party/.cypherlite/schema/schema.cypher +5 -0
  8. package/examples/data/graphs/party/.cypherlite.lock +1 -0
  9. package/examples/data/graphs/party/.cypherlite.writer +0 -0
  10. package/examples/data/graphs/party/manifest.json +215 -0
  11. package/examples/data/graphs/party/nodes/0-262144-7987dd27c85668d4810609133f705907.parquet +0 -0
  12. package/examples/data/graphs/party/wal/.cypherlite.lock +1 -0
  13. package/examples/data/graphs/party/wal/.cypherlite.writer +0 -0
  14. package/examples/data/graphs/party/wal/00000002.log +0 -0
  15. package/examples/data/hosts/party/changes.jsonl +19 -0
  16. package/examples/data/hosts/party/group.json +5 -0
  17. package/examples/data/hosts/party/sharing.json +1 -0
  18. package/examples/data/identity.json +4 -0
  19. package/models/temporal-claims/instructions.md +78 -0
  20. package/models/temporal-claims/model.yaml +99 -0
  21. package/models/temporal-claims/tools.yaml +344 -0
  22. package/package.json +71 -3
  23. package/plugin/.claude-plugin/plugin.json +8 -0
  24. package/plugin/.codex-plugin/plugin.json +17 -0
  25. package/plugin/.mcp.json +8 -0
  26. package/plugin/codex/hooks.json +11 -0
  27. package/plugin/commands/join.md +22 -0
  28. package/plugin/hooks/hooks.json +11 -0
  29. package/plugin/hooks/register.tsx +2310 -0
  30. package/plugin/hooks/vine-hook.mjs +25 -0
  31. package/plugin/skills/join-context-graph/SKILL.md +36 -0
  32. package/plugin/skills/vine-context/SKILL.md +235 -0
  33. package/plugin/tests/context-graph.test.tsx +830 -0
  34. package/plugin/types/index.d.ts +165 -0
@@ -0,0 +1,344 @@
1
+ # Tools for the temporal-claims model. See docs/model-packs.md for the format.
2
+ #
3
+ # Write tools only check their input against the graph here (steps that return
4
+ # `_error`); `apply` names the change they make, which src/core/graph.ts applies
5
+ # the same way on every member's machine.
6
+ #
7
+ # Server parameters, set on every call and never by the caller:
8
+ # $now the call's time, ISO 8601 (use datetime($now))
9
+ # $by the caller's name
10
+ # $key the caller's public key (what the graph records as `author`)
11
+ # $role the caller's role: reader, contributor or admin
12
+ #
13
+ # Read tools take an optional `at` and answer as the graph stood at that
14
+ # moment (record time): T below is datetime(coalesce($at, $now)).
15
+
16
+ fragments:
17
+ # The claim %1 was current at T: recorded by then, not withdrawn by then, and
18
+ # not replaced by a claim that was itself current at T.
19
+ current_claim: >-
20
+ %1.recorded_at <= T
21
+ AND (%1.withdrawn_at IS NULL OR %1.withdrawn_at > T)
22
+ AND NOT EXISTS {
23
+ MATCH (newer:Claim)-[rr:REPLACES]->(%1)
24
+ WHERE rr.recorded_at <= T AND (newer.withdrawn_at IS NULL OR newer.withdrawn_at > T)
25
+ }
26
+ # The question %1 existed at T and was not withdrawn by then.
27
+ live_question: >-
28
+ %1.recorded_at <= T AND (%1.withdrawn_at IS NULL OR %1.withdrawn_at > T)
29
+ # The question %1 was open at T: live, and no current claim answered it.
30
+ open_question: >-
31
+ {{live_question %1}}
32
+ AND NOT EXISTS {
33
+ MATCH (ans:Claim)-[ra:ANSWERS]->(%1)
34
+ WHERE ra.recorded_at <= T AND {{current_claim ans}}
35
+ }
36
+
37
+ tools:
38
+ - name: add_claim
39
+ title: Add a claim
40
+ kind: write
41
+ apply: claim
42
+ view: receipt
43
+ undo: { tool: withdraw }
44
+ description: >-
45
+ Record one statement you or the person believe is true. Use it in the
46
+ course of ordinary work, without being asked: when the chat reaches a
47
+ decision, establishes a fact or settles how something works, and it fits
48
+ what the context is for. Link it to the claims it supports, contradicts or
49
+ replaces and the questions it answers; to correct an earlier claim, use
50
+ replaces rather than withdrawing it.
51
+ input:
52
+ text: { type: string, required: true, max_length: 2000, description: The statement, in one or two sentences }
53
+ source: { type: string, max_length: 500, description: Where it came from (URL, file, meeting, person) }
54
+ about_from: { type: date, description: First day the statement is about (YYYY-MM-DD), if it is about a period }
55
+ about_to: { type: date, description: Last day the statement is about (YYYY-MM-DD) }
56
+ supports: { type: array, items: id, description: Ids of claims this is evidence for }
57
+ contradicts: { type: array, items: id, description: Ids of claims this cannot be true alongside }
58
+ replaces: { type: array, items: id, description: Ids of claims this is the newer version of }
59
+ answers: { type: array, items: id, description: Ids of questions this answers }
60
+ derive:
61
+ id: { new_id: c }
62
+ embedding: { embed: text }
63
+ steps:
64
+ - cypher: |
65
+ WITH coalesce($supports, []) + coalesce($contradicts, []) + coalesce($replaces, []) AS claim_refs,
66
+ coalesce($answers, []) AS question_refs
67
+ OPTIONAL MATCH (c:Claim) WHERE c.id IN claim_refs AND c.withdrawn_at IS NULL
68
+ WITH claim_refs, question_refs, collect(DISTINCT c.id) AS found_c
69
+ OPTIONAL MATCH (q:Question) WHERE q.id IN question_refs AND q.withdrawn_at IS NULL
70
+ WITH claim_refs, question_refs, found_c, collect(DISTINCT q.id) AS found_q
71
+ WITH [x IN claim_refs WHERE NOT x IN found_c] + [x IN question_refs WHERE NOT x IN found_q] AS missing
72
+ RETURN CASE
73
+ WHEN size(missing) > 0
74
+ THEN 'These ids are unknown or withdrawn: ' + reduce(s = '', x IN missing | s + CASE WHEN s = '' THEN '' ELSE ', ' END + x)
75
+ WHEN $about_from IS NOT NULL AND $about_to IS NOT NULL AND date($about_from) > date($about_to)
76
+ THEN 'about_from is after about_to.'
77
+ END AS _error
78
+
79
+ - name: ask_question
80
+ title: Ask a question
81
+ kind: write
82
+ apply: question
83
+ view: receipt
84
+ undo: { tool: withdraw }
85
+ description: >-
86
+ Record something the group needs to find out. Use it in the course of
87
+ ordinary work, without being asked: when the chat leaves a question open
88
+ that someone else in the context may be able to answer. Link it to the claims or
89
+ questions it is about. It stays open until a current claim answers it
90
+ (add_claim with answers, or link with ANSWERS). Search first: the question
91
+ may already be asked or answered.
92
+ input:
93
+ text: { type: string, required: true, max_length: 1000, description: The question }
94
+ about: { type: array, items: id, description: Ids of claims or questions it asks about }
95
+ derive:
96
+ id: { new_id: q }
97
+ embedding: { embed: text }
98
+ steps:
99
+ - cypher: |
100
+ WITH coalesce($about, []) AS refs
101
+ OPTIONAL MATCH (n:Claim|Question) WHERE n.id IN refs AND n.withdrawn_at IS NULL
102
+ WITH refs, collect(DISTINCT n.id) AS found
103
+ WITH [x IN refs WHERE NOT x IN found] AS missing
104
+ RETURN CASE WHEN size(missing) > 0
105
+ THEN 'These ids are unknown or withdrawn: ' + reduce(s = '', x IN missing | s + CASE WHEN s = '' THEN '' ELSE ', ' END + x)
106
+ END AS _error
107
+
108
+ - name: reply
109
+ title: Reply to a question
110
+ kind: write
111
+ apply: reply
112
+ view: receipt
113
+ undo: { tool: withdraw }
114
+ description: >-
115
+ Add a message to an open question's thread: what you or the person think,
116
+ a partial finding, a follow-up, or a question back. Other members' agents
117
+ see the thread (thread). A reply doesn't answer the question: when the
118
+ thread settles it, record a claim with answers (in your own words, standing
119
+ alone) so the question closes.
120
+ input:
121
+ question: { type: id, required: true, description: The question this replies to }
122
+ text: { type: string, required: true, max_length: 2000, description: The message }
123
+ derive:
124
+ id: { new_id: r }
125
+ steps:
126
+ - cypher: |
127
+ OPTIONAL MATCH (q:Question {id: $question}) WHERE q.withdrawn_at IS NULL
128
+ RETURN CASE WHEN q IS NULL THEN 'No current question ' + $question + '.' END AS _error
129
+
130
+ - name: link
131
+ title: Link two items
132
+ kind: write
133
+ apply: link
134
+ view: receipt
135
+ description: >-
136
+ Link an existing claim to another claim (SUPPORTS, CONTRADICTS, REPLACES)
137
+ or to a question it answers (ANSWERS). Use it when you notice a relation
138
+ between things already in the graph.
139
+ input:
140
+ from: { type: id, required: true, description: The claim the link starts from }
141
+ relation: { type: enum, values: [SUPPORTS, CONTRADICTS, REPLACES, ANSWERS], required: true, description: How the first relates to the second }
142
+ to: { type: id, required: true, description: The claim, or for ANSWERS the question, the link points to }
143
+ steps:
144
+ - cypher: |
145
+ OPTIONAL MATCH (a:Claim {id: $from}) WHERE a.withdrawn_at IS NULL
146
+ OPTIONAL MATCH (b:Claim|Question {id: $to}) WHERE b.withdrawn_at IS NULL
147
+ RETURN CASE
148
+ WHEN a IS NULL THEN 'No current claim ' + $from + '.'
149
+ WHEN b IS NULL THEN 'No current claim or question ' + $to + '.'
150
+ WHEN $from = $to THEN 'A claim cannot link to itself.'
151
+ WHEN $relation = 'ANSWERS' AND NOT b:Question THEN 'ANSWERS links a claim to a question.'
152
+ WHEN $relation <> 'ANSWERS' AND NOT b:Claim THEN $relation + ' links two claims.'
153
+ WHEN EXISTS { MATCH (a)-[r]->(b) WHERE type(r) = $relation } THEN 'That link already exists.'
154
+ END AS _error
155
+
156
+ - name: withdraw
157
+ title: Withdraw a claim, question or reply
158
+ kind: write
159
+ apply: withdraw
160
+ description: >-
161
+ Take back a claim, question or reply, for example one made by mistake
162
+ (only its author or an admin can). It stays in the history. To correct a
163
+ claim, prefer add_claim with replaces.
164
+ input:
165
+ id: { type: id, required: true, description: The claim, question or reply to withdraw }
166
+ reason: { type: string, max_length: 500, description: Why it is withdrawn }
167
+ steps:
168
+ - cypher: |
169
+ OPTIONAL MATCH (n:Claim|Question|Reply {id: $id})
170
+ RETURN CASE
171
+ WHEN n IS NULL THEN 'No claim, question or reply ' + $id + '.'
172
+ WHEN n.withdrawn_at IS NOT NULL THEN $id + ' is already withdrawn.'
173
+ WHEN NOT (n.author = $key OR (n.author IS NULL AND n.recorded_by = $by)) AND $role <> 'admin'
174
+ THEN 'Only its author (' + n.recorded_by + ') or an admin can withdraw it. Record a claim that replaces or contradicts it instead.'
175
+ END AS _error
176
+
177
+ - name: search
178
+ title: Search
179
+ kind: read
180
+ description: >-
181
+ Find claims and questions related to a text, by hybrid search (meaning
182
+ plus keywords): current claims, and questions with whether they are
183
+ answered. Search before adding, to avoid duplicates and to find what to
184
+ link to.
185
+ input:
186
+ query: { type: string, required: true, max_length: 1000, description: What to look for }
187
+ include_ended: { type: boolean, default: false, description: Also find replaced or withdrawn claims and withdrawn questions (each row says whether it is current) }
188
+ kind: { type: enum, values: [any, claim, question], default: any, description: Only claims, only questions, or both }
189
+ at: { type: datetime, description: Search the graph as it stood at this time (ISO 8601). Default now. }
190
+ limit: { type: integer, min: 1, max: 50, default: 10, description: How many results }
191
+ derive:
192
+ query_vector: { embed: query }
193
+ query_terms: { terms: query }
194
+ steps:
195
+ - cypher: |
196
+ MATCH (n:Claim|Question) SEARCH n IN (COMBINE (
197
+ VECTOR INDEX search_embedding FOR $query_vector LIMIT 100 WEIGHT 1,
198
+ FULLTEXT INDEX search_text FOR $query_terms LIMIT 100 WEIGHT 1
199
+ ) USING WRRF WITH CONSTANT 60 LIMIT 100) SCORE AS score
200
+ WITH n, score, datetime(coalesce($at, $now)) AS T
201
+ WITH n, score, T
202
+ WHERE ($kind = 'any' OR ($kind = 'claim' AND n:Claim) OR ($kind = 'question' AND n:Question))
203
+ AND n.recorded_at <= T
204
+ WITH n, score, T, (n:Claim AND {{current_claim n}}) OR (n:Question AND {{live_question n}}) AS current
205
+ WHERE current OR $include_ended
206
+ RETURN n.id AS id,
207
+ CASE WHEN n:Claim THEN 'claim' ELSE 'question' END AS kind,
208
+ current,
209
+ n.text AS text, n.source AS source, n.about_from AS about_from, n.about_to AS about_to,
210
+ n.recorded_at AS recorded_at, n.recorded_by AS recorded_by,
211
+ CASE WHEN n:Question THEN NOT ({{open_question n}}) END AS answered,
212
+ round(score, 4) AS score
213
+ ORDER BY score DESC
214
+ LIMIT $limit
215
+
216
+ - name: beliefs
217
+ title: What the group believes
218
+ kind: read
219
+ description: >-
220
+ List the claims that were current at a moment (default now), newest first,
221
+ with what each supports, contradicts, replaces and answers.
222
+ input:
223
+ at: { type: datetime, description: The moment to look at (ISO 8601). Default now. }
224
+ about_from: { type: date, description: Keep claims about days on or after this (YYYY-MM-DD) }
225
+ about_to: { type: date, description: Keep claims about days on or before this (YYYY-MM-DD) }
226
+ limit: { type: integer, min: 1, max: 200, default: 50, description: How many claims }
227
+ steps:
228
+ - cypher: |
229
+ WITH datetime(coalesce($at, $now)) AS T
230
+ MATCH (c:Claim)
231
+ WHERE {{current_claim c}}
232
+ AND ($about_from IS NULL OR c.about_to IS NULL OR c.about_to >= date($about_from))
233
+ AND ($about_to IS NULL OR c.about_from IS NULL OR c.about_from <= date($about_to))
234
+ WITH c, T ORDER BY c.recorded_at DESC LIMIT $limit
235
+ RETURN c.id AS id, c.text AS text, c.source AS source, c.about_from AS about_from, c.about_to AS about_to,
236
+ c.recorded_at AS recorded_at, c.recorded_by AS recorded_by,
237
+ [(c)-[r:SUPPORTS]->(x) WHERE r.recorded_at <= T | x.id] AS supports,
238
+ [(c)-[r:CONTRADICTS]->(x) WHERE r.recorded_at <= T | x.id] AS contradicts,
239
+ [(c)-[r:REPLACES]->(x) WHERE r.recorded_at <= T | x.id] AS replaces,
240
+ [(c)-[r:ANSWERS]->(x) WHERE r.recorded_at <= T | x.id] AS answers
241
+
242
+ - name: open_questions
243
+ title: Open questions
244
+ kind: read
245
+ description: >-
246
+ List the questions that were open at a moment (default now): asked, not
247
+ withdrawn, and not answered by a current claim. Newest first, with how many
248
+ replies each thread has (thread reads one).
249
+ input:
250
+ at: { type: datetime, description: The moment to look at (ISO 8601). Default now. }
251
+ limit: { type: integer, min: 1, max: 200, default: 50, description: How many questions }
252
+ steps:
253
+ - cypher: |
254
+ WITH datetime(coalesce($at, $now)) AS T
255
+ MATCH (q:Question) WHERE {{open_question q}}
256
+ RETURN q.id AS id, q.text AS text, q.recorded_at AS recorded_at, q.recorded_by AS recorded_by,
257
+ [(q)-[r:ABOUT]->(x) WHERE r.recorded_at <= T | x.id] AS about,
258
+ size([(m:Reply)-[r:REPLIES_TO]->(q) WHERE r.recorded_at <= T AND (m.withdrawn_at IS NULL OR m.withdrawn_at > T) | m.id]) AS replies
259
+ ORDER BY recorded_at DESC
260
+ LIMIT $limit
261
+
262
+ - name: thread
263
+ title: A question's thread
264
+ kind: read
265
+ description: >-
266
+ Read one question with its thread: the replies, oldest first, and the
267
+ current claims that answer it. Read it before replying or answering, so you
268
+ build on what others said.
269
+ input:
270
+ question: { type: id, required: true, description: The question }
271
+ at: { type: datetime, description: Read it as it stood at this time (ISO 8601). Default now. }
272
+ steps:
273
+ - cypher: |
274
+ OPTIONAL MATCH (q:Question {id: $question})
275
+ RETURN CASE WHEN q IS NULL THEN 'No question ' + $question + '.' END AS _error
276
+ - cypher: |
277
+ WITH datetime(coalesce($at, $now)) AS T
278
+ MATCH (q:Question {id: $question})
279
+ RETURN q {.id, .text, .recorded_at, .recorded_by, .withdrawn_at} AS question,
280
+ NOT ({{open_question q}}) AND {{live_question q}} AS answered,
281
+ [(m:Reply)-[r:REPLIES_TO]->(q) WHERE r.recorded_at <= T AND (m.withdrawn_at IS NULL OR m.withdrawn_at > T)
282
+ | m {.id, .text, .recorded_at, .recorded_by}] AS replies,
283
+ [(c:Claim)-[r:ANSWERS]->(q) WHERE r.recorded_at <= T AND {{current_claim c}}
284
+ | c {.id, .text, .recorded_at, .recorded_by}] AS answers
285
+ single: true
286
+
287
+ - name: conflicts
288
+ title: Conflicts
289
+ kind: read
290
+ view: conflicts
291
+ description: >-
292
+ List pairs of current claims where one contradicts the other: what a person
293
+ needs to settle, by recording a claim that replaces one or both.
294
+ input:
295
+ at: { type: datetime, description: The moment to look at (ISO 8601). Default now. }
296
+ steps:
297
+ - cypher: |
298
+ WITH datetime(coalesce($at, $now)) AS T
299
+ MATCH (a:Claim)-[r:CONTRADICTS]->(b:Claim)
300
+ WHERE r.recorded_at <= T AND {{current_claim a}} AND {{current_claim b}}
301
+ RETURN a {.id, .text, .recorded_by, .recorded_at} AS claim,
302
+ b {.id, .text, .recorded_by, .recorded_at} AS contradicts,
303
+ r.recorded_at AS since, r.recorded_by AS flagged_by
304
+ ORDER BY since DESC
305
+
306
+ - name: history
307
+ title: History of an item
308
+ kind: read
309
+ description: >-
310
+ Show one claim or question with every link into and out of it, including
311
+ replaced and withdrawn ones, with who recorded each and when.
312
+ input:
313
+ id: { type: id, required: true, description: The claim or question }
314
+ steps:
315
+ - cypher: |
316
+ OPTIONAL MATCH (n:Claim|Question {id: $id})
317
+ RETURN CASE WHEN n IS NULL THEN 'No claim or question ' + $id + '.' END AS _error
318
+ - cypher: |
319
+ MATCH (n:Claim|Question {id: $id})
320
+ RETURN CASE WHEN n:Claim THEN 'claim' ELSE 'question' END AS kind,
321
+ n {.id, .text, .source, .about_from, .about_to, .recorded_at, .recorded_by,
322
+ .withdrawn_at, .withdrawn_by, .withdraw_reason} AS item,
323
+ [(n)-[r]->(x) | {direction: 'out', type: type(r), id: x.id, text: x.text, recorded_at: r.recorded_at, recorded_by: r.recorded_by}]
324
+ + [(x)-[r]->(n) | {direction: 'in', type: type(r), id: x.id, text: x.text, recorded_at: r.recorded_at, recorded_by: r.recorded_by}] AS links
325
+ single: true
326
+
327
+ - name: recent
328
+ title: Recent changes
329
+ kind: read
330
+ description: >-
331
+ What was added or withdrawn since a moment, newest first. Use it to catch up
332
+ at the start of a session.
333
+ input:
334
+ since: { type: datetime, required: true, description: Changes after this time (ISO 8601) }
335
+ limit: { type: integer, min: 1, max: 200, default: 50, description: How many changes }
336
+ steps:
337
+ - cypher: |
338
+ MATCH (n:Claim|Question)
339
+ WHERE n.recorded_at > datetime($since) OR n.withdrawn_at > datetime($since)
340
+ RETURN n.id AS id, CASE WHEN n:Claim THEN 'claim' ELSE 'question' END AS kind, n.text AS text,
341
+ n.recorded_at AS recorded_at, n.recorded_by AS recorded_by,
342
+ n.withdrawn_at AS withdrawn_at, n.withdrawn_by AS withdrawn_by
343
+ ORDER BY coalesce(n.withdrawn_at, n.recorded_at) DESC
344
+ LIMIT $limit
package/package.json CHANGED
@@ -1,13 +1,81 @@
1
1
  {
2
2
  "name": "vine-context",
3
- "version": "0.0.1",
4
- "description": "Placeholder: the first release of Vine Context (0.1.0) is coming soon.",
3
+ "version": "0.1.1",
4
+ "description": "Share a Relate context graph with other people's AI agents, peer to peer. An AI skill plus a local MCP server.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/CraigDeverall/vine-context.git"
9
9
  },
10
+ "homepage": "https://github.com/CraigDeverall/vine-context#readme",
11
+ "bugs": "https://github.com/CraigDeverall/vine-context/issues",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "bin": {
17
+ "vine": "dist/cli.js"
18
+ },
10
19
  "files": [
20
+ "dist",
21
+ "plugin",
22
+ "models",
23
+ "examples",
24
+ "LICENSE",
11
25
  "README.md"
12
- ]
26
+ ],
27
+ "keywords": [
28
+ "relate",
29
+ "neo4j",
30
+ "mcp",
31
+ "context-graph",
32
+ "p2p",
33
+ "webrtc",
34
+ "claude-code",
35
+ "agent-skill"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsup && node scripts/build-apps.mjs",
39
+ "typecheck": "tsc --noEmit && tsc -p apps",
40
+ "test": "vitest run",
41
+ "test:turn": "node scripts/turn-server.mjs test",
42
+ "check": "npm run typecheck && npm test && npm run build",
43
+ "pack:check": "node scripts/pack-check.mjs",
44
+ "prepack": "npm run build",
45
+ "build:apps": "node scripts/build-apps.mjs",
46
+ "build:embedder": "node scripts/build-embedder.mjs",
47
+ "pack:embedder": "node scripts/pack-embedder.mjs --pack",
48
+ "examples": "tsx scripts/make-examples.ts"
49
+ },
50
+ "dependencies": {
51
+ "@modelcontextprotocol/sdk": "^1.32.2",
52
+ "@relate/relate": "1.0.1",
53
+ "node-datachannel": "^0.33.6",
54
+ "nostr-tools": "^2.26.0",
55
+ "ws": "^8.23.0",
56
+ "yaml": "^2.9.1",
57
+ "zod": "^4.6.7"
58
+ },
59
+ "devDependencies": {
60
+ "@modelcontextprotocol/ext-apps": "1.7.5",
61
+ "@squonk/ui": "file:vendor/squonk-ui-9.1.0.tgz",
62
+ "@types/node": "^22.20.5",
63
+ "@types/react": "19.3.0",
64
+ "@types/react-dom": "19.3.0",
65
+ "@types/ws": "^8.18.2",
66
+ "esbuild": "0.28.2",
67
+ "react": "19.3.1",
68
+ "react-dom": "19.3.1",
69
+ "tsup": "^8.5.1",
70
+ "tsx": "^4.23.15",
71
+ "typescript": "^7.0.2",
72
+ "vitest": "^5.1.0"
73
+ },
74
+ "optionalDependencies": {
75
+ "vine-context-embedder-darwin-arm64": "0.1.0",
76
+ "vine-context-embedder-darwin-x64": "0.1.0",
77
+ "vine-context-embedder-linux-arm64": "0.1.0",
78
+ "vine-context-embedder-linux-x64": "0.1.0",
79
+ "vine-context-embedder-win32-x64": "0.1.0"
80
+ }
13
81
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "vine-context",
3
+ "version": "0.1.1",
4
+ "description": "Share a Relate context graph of dated claims and open questions with other people's AI agents, peer to peer. Every member keeps a full copy, synced whenever they're online.",
5
+ "license": "Apache-2.0",
6
+ "types": "./types/index.d.ts",
7
+ "keywords": ["relate", "neo4j", "context-graph", "mcp", "p2p"]
8
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "vine-context",
3
+ "version": "0.1.1",
4
+ "description": "Share a Relate context graph of dated claims and open questions with other people's AI agents, peer to peer. Every member keeps a full copy, synced whenever they're online.",
5
+ "license": "Apache-2.0",
6
+ "keywords": ["relate", "neo4j", "context-graph", "mcp", "p2p"],
7
+ "skills": "./skills/",
8
+ "mcpServers": "./.mcp.json",
9
+ "hooks": "./codex/hooks.json",
10
+ "interface": {
11
+ "displayName": "Vine Context",
12
+ "shortDescription": "Share a context graph between people's agents",
13
+ "longDescription": "One shared Relate graph for a group's agents, peer to peer with no server. Every member keeps a full copy that syncs when they're online. Record claims and questions; share it with a join code; see who believed what, when.",
14
+ "category": "Productivity",
15
+ "capabilities": ["Read", "Write"]
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "vine-context": {
4
+ "command": "vine",
5
+ "args": ["mcp"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "description": "Vine Context's Codex hooks: tell the agent what the chat's context is for, and what other members' changes meant, beside the person's prompt. Codex reads this file rather than hooks/hooks.json, which also holds the Claude Code mod.",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ { "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/vine-hook.mjs\" session-start", "timeout": 5 }] }
6
+ ],
7
+ "UserPromptSubmit": [
8
+ { "hooks": [{ "type": "command", "command": "node \"${PLUGIN_ROOT}/hooks/vine-hook.mjs\" prompt", "timeout": 5 }] }
9
+ ]
10
+ }
11
+ }
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Join someone's shared context with the join code they sent you
3
+ argument-hint: <vine1_ join code>
4
+ ---
5
+
6
+ Join the shared context with this join code: $ARGUMENTS
7
+
8
+ 1. Call the `join_context` tool of the vine-context MCP server with the
9
+ code exactly as given above. If no code was given, call `context_info` and
10
+ offer the contexts in `your_contexts` instead (`use_context` makes one this
11
+ chat's context, no code needed).
12
+ 2. I'm let in at once, with my own full copy, and it's added to this chat.
13
+ Tell me whose context it is, what it's for, my role, and that everyone in it
14
+ has been told I joined (my name, key fingerprint and agent). Then give me its
15
+ briefing in a few lines: open questions, conflicts, the latest.
16
+ 3. Call `model_guide` before writing anything to it.
17
+ 4. If no one answers, the person who made the code isn't online: tell me to
18
+ try again later. If it was already used on another machine and not by me,
19
+ tell me to warn them that the code may have leaked. If it's refused because
20
+ it was used, expired or was cancelled, tell me to ask for a new code.
21
+
22
+ Don't post the code anywhere: whoever uses it first gets in.
@@ -0,0 +1,11 @@
1
+ {
2
+ "modules": ["./register.tsx"],
3
+ "hooks": {
4
+ "SessionStart": [
5
+ { "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/vine-hook.mjs\" session-start", "timeout": 5 }] }
6
+ ],
7
+ "UserPromptSubmit": [
8
+ { "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/vine-hook.mjs\" prompt", "timeout": 5 }] }
9
+ ]
10
+ }
11
+ }