@miadi/connector 0.1.32 → 0.1.33
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 +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools.js +38 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Call `get_capabilities` first. It names the signed-in person, their Miadi API ti
|
|
|
20
20
|
|
|
21
21
|
| kind | tools |
|
|
22
22
|
|---|---|
|
|
23
|
-
| reads | `get_capabilities` `get_context` `list_circles` `get_circle` `list_sessions` `get_session` `get_evidence` `read_episode_file` `get_evaluations` `get_narrative_beats` `review_lookup` `review_versions` `handoff_status` `list_records` `get_run_result` `mission_status` `provider_capabilities` `mission_model_preflight` `search` `fetch` `list_research_artifacts` `read_research_artifact` |
|
|
23
|
+
| reads | `get_capabilities` `get_context` `list_circles` `get_circle` `list_sessions` `search_sessions` `get_session` `get_evidence` `read_episode_file` `get_evaluations` `get_narrative_beats` `review_lookup` `review_versions` `handoff_status` `list_records` `get_run_result` `mission_status` `provider_capabilities` `mission_model_preflight` `search` `fetch` `list_research_artifacts` `read_research_artifact` |
|
|
24
24
|
| contributions | `append_observation` `open_inquiry` `link_records` `propose_narrative_beat` `record_evaluation` `register_source_intent` `record_handoff` `update_handoff` `prepare_calendar_event` `save_research` |
|
|
25
25
|
| requests (approved by a person) | `propose_work` `propose_session_completion` `request_authorized_run` `request_session_steer` `revoke_session_steering` `request_review_operation` `request_deep_diver` `link_review_to_episode` `request_inquiry_episode` |
|
|
26
26
|
| decisions in the conversation | `show_decisions` (cards), `decide_request` (called by the card only) |
|
package/dist/server.d.ts
CHANGED
|
@@ -55,4 +55,4 @@ export declare function createConnectorApp(config: ConnectorConfig, deps: Connec
|
|
|
55
55
|
provider: MiadiOAuthProvider;
|
|
56
56
|
ledger: Ledger<ConnectorRecord>;
|
|
57
57
|
};
|
|
58
|
-
export declare const INSTRUCTIONS = "Miadi is a relational software factory: agent sessions, Miadi reviews of screenwalks, Chronicle episodes, talking circles and the five accountable circles (Story, Stewardship, Engineering, Evaluation, Continuity) across three domains (Creative, Ceremonial, Engineering).\n\nStart with get_capabilities: it says who you are signed in as, which tools are live, and which return not_implemented.\n\nEvery tool is offered on every connection. A client that loads tools on demand shows only those its last tool search matched: a tool you do not see is not missing. Search for it by its exact name, get_capabilities first, before telling the person a tool is absent. The main reads are get_capabilities, get_context, search, fetch, list_records, list_sessions, get_session, review_lookup, read_episode_file and show_decisions.\n\nRules every tool keeps:\n- Every record names the person who made it, with a claim category: observed, hypothesis, desired_future, fiction or verified_implementation. Keep fiction and desired futures apart from what was observed.\n- Requests (runs, work proposals, review operations, Deep Diver, review-to-episode links, inquiry-to-episode weaves, session completion) are recorded as awaiting_approval. Nothing runs, publishes or closes until a person decides. After making a request, call show_decisions: it shows the request as a card in the conversation, where the person decides with their own click (or follows its approval page). Never claim a decision the card has not reported. The person may approve, approve with changes (their instructions are carried into what runs), send it back for revision with instructions (approval_state revision_requested; read the instructions with get_run_result and revise it in place with revise_pending_request), or decline.\n- A new or revised run or work proposal answers with draft_review: the aspects of the mission standard to revise, each with why, the question to settle and who can settle it. Read it before show_decisions. It carries no verdict, it advises and blocks nothing, and next_action says what to do. Answer what your conversation holds, ask the person the rest, then revise. preferences lists the person's standing preferences for you to apply. Fill delivery with the one exact place the result lands, and person_words with the person's own words, verbatim, for anything credited to them.\n- A mission is revised, never re-requested: to change a run or work proposal that still awaits a decision, call revise_pending_request with its id and the version you read (expected_version). It keeps one id, one approval page and one card; get_request_history shows every version. A new request_authorized_run or propose_work is for a new mission only. Requests made earlier as separate versions are joined with supersede_pending_requests, naming their exact ids, only when the person names or confirms them.\n- A research report (a Deep Research report) is delivered with save_research exactly as written, never summarised or shortened, with its sources; a long report goes in parts. Check the bytes and first and last lines the answer returns against what you sent.\n- An unknown id is answered as not found, never invented. A missing backing service is answered as unavailable.\n- Use the miadi-review:<uuid>, miadi-chronicle://<n>, owner/repo#n and session:<uuid> reference forms.";
|
|
58
|
+
export declare const INSTRUCTIONS = "Miadi is a relational software factory: agent sessions, Miadi reviews of screenwalks, Chronicle episodes, talking circles and the five accountable circles (Story, Stewardship, Engineering, Evaluation, Continuity) across three domains (Creative, Ceremonial, Engineering).\n\nStart with get_capabilities: it says who you are signed in as, which tools are live, and which return not_implemented.\n\nEvery tool is offered on every connection. A client that loads tools on demand shows only those its last tool search matched: a tool you do not see is not missing. Search for it by its exact name, get_capabilities first, before telling the person a tool is absent. The main reads are get_capabilities, get_context, search, fetch, list_records, list_sessions, search_sessions, get_session, review_lookup, read_episode_file and show_decisions.\n\nRules every tool keeps:\n- Every record names the person who made it, with a claim category: observed, hypothesis, desired_future, fiction or verified_implementation. Keep fiction and desired futures apart from what was observed.\n- Requests (runs, work proposals, review operations, Deep Diver, review-to-episode links, inquiry-to-episode weaves, session completion) are recorded as awaiting_approval. Nothing runs, publishes or closes until a person decides. After making a request, call show_decisions: it shows the request as a card in the conversation, where the person decides with their own click (or follows its approval page). Never claim a decision the card has not reported. The person may approve, approve with changes (their instructions are carried into what runs), send it back for revision with instructions (approval_state revision_requested; read the instructions with get_run_result and revise it in place with revise_pending_request), or decline.\n- A new or revised run or work proposal answers with draft_review: the aspects of the mission standard to revise, each with why, the question to settle and who can settle it. Read it before show_decisions. It carries no verdict, it advises and blocks nothing, and next_action says what to do. Answer what your conversation holds, ask the person the rest, then revise. preferences lists the person's standing preferences for you to apply. Fill delivery with the one exact place the result lands, and person_words with the person's own words, verbatim, for anything credited to them.\n- A mission is revised, never re-requested: to change a run or work proposal that still awaits a decision, call revise_pending_request with its id and the version you read (expected_version). It keeps one id, one approval page and one card; get_request_history shows every version. A new request_authorized_run or propose_work is for a new mission only. Requests made earlier as separate versions are joined with supersede_pending_requests, naming their exact ids, only when the person names or confirms them.\n- A research report (a Deep Research report) is delivered with save_research exactly as written, never summarised or shortened, with its sources; a long report goes in parts. Check the bytes and first and last lines the answer returns against what you sent.\n- An unknown id is answered as not found, never invented. A missing backing service is answered as unavailable.\n- Use the miadi-review:<uuid>, miadi-chronicle://<n>, owner/repo#n and session:<uuid> reference forms.";
|
package/dist/server.js
CHANGED
|
@@ -179,7 +179,7 @@ export const INSTRUCTIONS = `Miadi is a relational software factory: agent sessi
|
|
|
179
179
|
|
|
180
180
|
Start with get_capabilities: it says who you are signed in as, which tools are live, and which return not_implemented.
|
|
181
181
|
|
|
182
|
-
Every tool is offered on every connection. A client that loads tools on demand shows only those its last tool search matched: a tool you do not see is not missing. Search for it by its exact name, get_capabilities first, before telling the person a tool is absent. The main reads are get_capabilities, get_context, search, fetch, list_records, list_sessions, get_session, review_lookup, read_episode_file and show_decisions.
|
|
182
|
+
Every tool is offered on every connection. A client that loads tools on demand shows only those its last tool search matched: a tool you do not see is not missing. Search for it by its exact name, get_capabilities first, before telling the person a tool is absent. The main reads are get_capabilities, get_context, search, fetch, list_records, list_sessions, search_sessions, get_session, review_lookup, read_episode_file and show_decisions.
|
|
183
183
|
|
|
184
184
|
Rules every tool keeps:
|
|
185
185
|
- Every record names the person who made it, with a claim category: observed, hypothesis, desired_future, fiction or verified_implementation. Keep fiction and desired futures apart from what was observed.
|
package/dist/tools.js
CHANGED
|
@@ -559,6 +559,43 @@ export function registerTools(server, ctx) {
|
|
|
559
559
|
qs.set("limit", String(args.limit ?? 30));
|
|
560
560
|
return miadi.get(person.token, `/api/session?${qs}`);
|
|
561
561
|
}));
|
|
562
|
+
server.registerTool("search_sessions", {
|
|
563
|
+
title: "Search inside agent sessions",
|
|
564
|
+
description: "Which agent sessions said, wrote, ran or committed something: words in a person's prompts and the agent's replies, a command, a file written, a commit, a push, an issue (owner/repo#n) or a repository. Each session comes with its matching moments (kind, time, an excerpt), newest first, and bounds that name how many sessions the read left. Miadi searches the capture on its host (miadi-hooks-interpret search), so a seat with no file access gets the same answer. Needs Miadi's write tier: sessions are operator data.",
|
|
565
|
+
inputSchema: {
|
|
566
|
+
q: z.string().min(1).describe('Words a moment holds, all of them, any case. "a phrase" is one word; owner/repo#n also matches the issue\'s URL and #n in a commit of that repository.'),
|
|
567
|
+
since: z.string().optional().describe("A duration back from now (45m, 2h, 3d), a date or an ISO time."),
|
|
568
|
+
until: z.string().optional().describe("A duration back from now, a date or an ISO time."),
|
|
569
|
+
team: z.string().optional().describe("The binding line's team id, e.g. T8."),
|
|
570
|
+
session_ids: z.array(z.string()).max(50).optional().describe("Only these sessions: ids, session:<id>, or id prefixes of 8 characters or more."),
|
|
571
|
+
kinds: z
|
|
572
|
+
.array(z.enum(["prompt", "message", "reply", "command", "file", "commit", "push", "publication"]))
|
|
573
|
+
.optional()
|
|
574
|
+
.describe("Only these kinds of moment."),
|
|
575
|
+
limit: z.number().int().min(1).max(100).optional().describe("Sessions to return (default 10)."),
|
|
576
|
+
moments: z.number().int().min(1).max(50).optional().describe("Moments per session (default 5)."),
|
|
577
|
+
},
|
|
578
|
+
annotations: READ,
|
|
579
|
+
}, wrap(async (args, extra) => {
|
|
580
|
+
const { person } = who(extra);
|
|
581
|
+
requireTier(person, "write");
|
|
582
|
+
const qs = new URLSearchParams({ q: args.q });
|
|
583
|
+
if (args.since)
|
|
584
|
+
qs.set("since", args.since);
|
|
585
|
+
if (args.until)
|
|
586
|
+
qs.set("until", args.until);
|
|
587
|
+
if (args.team)
|
|
588
|
+
qs.set("team", args.team);
|
|
589
|
+
if (args.session_ids?.length)
|
|
590
|
+
qs.set("session", args.session_ids.map((s) => s.replace(/^session:/, "")).join(","));
|
|
591
|
+
if (args.kinds?.length)
|
|
592
|
+
qs.set("kind", args.kinds.join(","));
|
|
593
|
+
if (args.limit)
|
|
594
|
+
qs.set("limit", String(args.limit));
|
|
595
|
+
if (args.moments)
|
|
596
|
+
qs.set("moments", String(args.moments));
|
|
597
|
+
return miadi.get(person.token, `/api/session/search?${qs}`);
|
|
598
|
+
}));
|
|
562
599
|
server.registerTool("get_session", {
|
|
563
600
|
title: "One agent session",
|
|
564
601
|
description: "One session by id: what it was asked to do, what its record says it completed, what it holds, its ending (proposed or decided), the live pane state, its commits and related episodes, its missions (each labelled by binding: factory_receipt for a brief the factory runner delivered, miadi_run for a miadi-run mission given to it or signed by it), and the connector records that cite it (handoffs, completion proposals).",
|
|
@@ -2669,6 +2706,7 @@ export const TOOL_STATUS = {
|
|
|
2669
2706
|
get_circle: "live",
|
|
2670
2707
|
list_sessions: "live, Miadi write tier",
|
|
2671
2708
|
get_session: "live, Miadi write tier",
|
|
2709
|
+
search_sessions: "live, Miadi write tier (searched on Miadi's host; the read stops at 20 s and names what it left)",
|
|
2672
2710
|
get_evidence: "live",
|
|
2673
2711
|
read_episode_file: "live (Miadi read tier: an episode's text files; chronicle_foundations_read alone: foundations/<topic>/*.md; up to 512 KiB, paged; read as you, nothing changed)",
|
|
2674
2712
|
get_evaluations: "live (tracing records and recorded assessments; no provider scores)",
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.33";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.33";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/connector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "The Miadi connector: one remote MCP service through which a person signed in with their Miadi person token, from ChatGPT or any MCP client, reads sessions, reviews, episodes and circles and records observations, inquiries, handoffs and proposals with their name on each record.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Miadi",
|