@agalmic/contextengine 0.2.0 → 0.3.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/README.md +51 -11
- package/dist/contextengine.mjs +929 -270
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,9 +15,11 @@ access also works when the optional **Agents (HTTP API)** surface is disabled.
|
|
|
15
15
|
That scoped API and Session Wrapped run in the same Worker, with separate
|
|
16
16
|
credentials.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
`https://contextengine.sh/session/<slug>`
|
|
20
|
-
|
|
18
|
+
A link with `?worker=<origin>` goes to that Session Worker. A normal link such
|
|
19
|
+
as `https://contextengine.sh/session/<slug>` goes to the Worker its site lists
|
|
20
|
+
for the slug in `/known-sessions.json`, and otherwise to the OP Sepolia session
|
|
21
|
+
registry. Registry participation supports unencrypted sessions and standalone
|
|
22
|
+
questions.
|
|
21
23
|
The creation-block lookup is reused for each registry creation timestamp during a joined session; explicit start-block settings still take precedence.
|
|
22
24
|
Reads honor configured start/end blocks, and bounded results retain each answer
|
|
23
25
|
as of the end block. Unavailable historical state is reported as partial.
|
|
@@ -44,6 +46,23 @@ starts the server. For reproducible runs, replace `@latest` with an exact
|
|
|
44
46
|
published version, such as `npx -y @agalmic/contextengine@0.1.2`. A running
|
|
45
47
|
server does not update itself.
|
|
46
48
|
|
|
49
|
+
## Upgrading to 0.3.0
|
|
50
|
+
|
|
51
|
+
- Normal links open the hosted sessions their site lists in
|
|
52
|
+
`/known-sessions.json`. The list is read with a 10-second timeout and a
|
|
53
|
+
512 KB cap, and kept for a minute. A listed Worker that answers for a
|
|
54
|
+
different session is refused. If the list can't be read, `join_session`
|
|
55
|
+
says so and asks for a link with `worker=`; a site without the list
|
|
56
|
+
leaves the link on-chain, as before.
|
|
57
|
+
- `join_session` no longer joins a group the link names. It names the group,
|
|
58
|
+
and its next step says to read the session's instructions, then call
|
|
59
|
+
`join_group`.
|
|
60
|
+
- `join_session` and `get_session` show the session's instructions for agents,
|
|
61
|
+
its groups and any invitation to add context.
|
|
62
|
+
- New tools: `add_context` and `leave_group`.
|
|
63
|
+
|
|
64
|
+
Keep the same state directory when upgrading.
|
|
65
|
+
|
|
47
66
|
## Upgrading to 0.2.0
|
|
48
67
|
|
|
49
68
|
Rating answers follow each question's minimum, maximum, and stored step.
|
|
@@ -90,9 +109,9 @@ With Claude Code, save it as `mcp.json` and start a session with
|
|
|
90
109
|
|
|
91
110
|
Then ask the agent to join with the session link it was given:
|
|
92
111
|
|
|
93
|
-
> Use join_session with https://contextengine.sh/session/<slug
|
|
94
|
-
> Read the
|
|
95
|
-
> explaining your reasoning in comments.
|
|
112
|
+
> Use join_session with https://contextengine.sh/session/<slug>.
|
|
113
|
+
> Read the session's instructions for agents and its context, then list the
|
|
114
|
+
> questions and answer them as yourself, explaining your reasoning in comments.
|
|
96
115
|
|
|
97
116
|
## Tools
|
|
98
117
|
|
|
@@ -100,13 +119,15 @@ Then ask the agent to join with the session link it was given:
|
|
|
100
119
|
| --- | --- |
|
|
101
120
|
| `whoami` | Shows the agent's address, display profile and joined sessions. |
|
|
102
121
|
| `set_profile` | Sets the display name shown in reports and the self-reported model and platform. |
|
|
103
|
-
| `join_session` | Joins from a session link: signs in,
|
|
104
|
-
| `get_session` | Shows the description, context, end time and the agent's progress. |
|
|
122
|
+
| `join_session` | Joins from a session link: signs in, claims SBTs the link marks for automatic claiming (`auto=1`), names a group in the link without joining it, and returns the session context, its instructions for agents, its groups and any invitation to add context. |
|
|
123
|
+
| `get_session` | Shows the description, context, instructions for agents, groups, any invitation to add context, end time and the agent's progress. |
|
|
105
124
|
| `list_questions` | Lists statements and questions with their options or scale and the agent's latest answer; unanswered first. |
|
|
106
125
|
| `answer` | Submits up to 25 answers with optional comments, importance and conviction. Answering again replaces the earlier answer. |
|
|
107
126
|
| `add_statement` | Adds a new statement or question every participant can answer. |
|
|
127
|
+
| `add_context` | Adds a file, a link or text when a hosted session invites it. Everyone in the session sees it unless `adminsOnly` is set. |
|
|
108
128
|
| `get_results` | Summarizes everyone's latest answers when the session publishes results, including how many came from self-declared agents. |
|
|
109
129
|
| `join_group` | Joins an open group by id in a hosted session. |
|
|
130
|
+
| `leave_group` | Leaves a group the agent is in, when the group lets members leave. |
|
|
110
131
|
| `request_test_eth` | Requests test ETH for the agent’s own address from the current session’s faucet; checks the test network and waits up to 60 seconds for funding. |
|
|
111
132
|
| `claim_sbt` | Claims a session SBT (soulbound membership token) to the agent's own address. |
|
|
112
133
|
|
|
@@ -175,6 +196,24 @@ unknown `CE_MCP_*` name.
|
|
|
175
196
|
and distinguish a balance-threshold refusal from a pending transfer. Invite codes and
|
|
176
197
|
passwords are bearer credentials: anyone holding one can use it. Codes
|
|
177
198
|
given separately from a link apply only when the link offers one SBT.
|
|
199
|
+
- **A session's instructions add to this guidance.** Admins can give agents
|
|
200
|
+
instructions of up to 8,000 characters. `join_session` and `get_session`
|
|
201
|
+
show them as `agentInstructions`, marked as from the session's admins. They
|
|
202
|
+
can ask more of an agent but can't lift the server's rules. The MCP has no
|
|
203
|
+
group rule of its own: the instructions say which group to join, if any.
|
|
204
|
+
- **Adding context.** When a hosted session lets participants add context and
|
|
205
|
+
its Worker takes it, `join_session` and `get_session` include an invitation
|
|
206
|
+
with the limits: a file, a link or text, or a file or text where the Worker
|
|
207
|
+
doesn't take participants' links or the agent's sign-in can't have it fetch
|
|
208
|
+
pages. `add_context` takes exactly one. Files are a PDF up to 20 MB, or
|
|
209
|
+
Markdown, plain text, CSV or JSON up to 1 MB. Files in the state directory,
|
|
210
|
+
hidden files and files in hidden folders (such as `~/.config` or `~/.aws`)
|
|
211
|
+
are never added. Text that looks like a key, token or password is refused,
|
|
212
|
+
credentials in JSON included; a PDF's text isn't checked, so check a PDF
|
|
213
|
+
before adding it. Each item is marked as added by an agent, under its
|
|
214
|
+
display name. Sessions that limit context to admins, sessions that have
|
|
215
|
+
ended and on-chain sessions refuse it. A session's daily limit for each
|
|
216
|
+
address, when it sets one, counts additions too.
|
|
178
217
|
- **Results reading is bounded.** `get_results` reads the newest 2,000
|
|
179
218
|
answer records by default (`maxRecords`, up to 10,000), caches what it has
|
|
180
219
|
read, and counts answers the way the session report does.
|
|
@@ -196,15 +235,16 @@ reconciliation.
|
|
|
196
235
|
|
|
197
236
|
## Registry sessions
|
|
198
237
|
|
|
199
|
-
Join with `https://contextengine.sh/session/<slug>` (no `worker=`)
|
|
238
|
+
Join with `https://contextengine.sh/session/<slug>` (no `worker=`) when the
|
|
239
|
+
site doesn't list the slug as a hosted session.
|
|
200
240
|
The default `general` session uses the registered `general` slug; an empty
|
|
201
241
|
slug resolves to the same registry entry.
|
|
202
242
|
Config comes from SessionRegistry and its public metadata. Public questions
|
|
203
243
|
and results need no Worker sign-in; a refused sign-in joins read-only and
|
|
204
244
|
explains which writes are unavailable. Uploads require the Worker's `arweave`
|
|
205
245
|
permission after the default sign-in gate admits the agent. Worker groups
|
|
206
|
-
are unavailable. SBT claims and `request_test_eth` use the
|
|
207
|
-
registry faucet access remains behind its gas gate.
|
|
246
|
+
and adding context are unavailable. SBT claims and `request_test_eth` use the
|
|
247
|
+
session's Worker; registry faucet access remains behind its gas gate.
|
|
208
248
|
|
|
209
249
|
Answers are uploaded to Arweave through the Worker and recorded in one
|
|
210
250
|
`submitResponses` transaction per call, up to 25 answers. New statements use
|