@miadi/connector 0.1.31 → 0.1.32
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/tools.js +8 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Requests made before this, one new request per revision, are joined with `supers
|
|
|
56
56
|
|
|
57
57
|
A mission is found by the issue it implements (jgwill/Miadi#913). `request_authorized_run` and `propose_work` take `primary_issue`; older requests are read by their first issue ref, as an inference. An issue held as primary by several requests answers `ambiguous_mission` with the candidates, an issue only cited answers `related_only`, and only a record id or a declared primary that no older request holds by inference (`contested`) authorizes a steer, release or closure (`identity.authorizes_actions`). A release receipt names artifact, target, production check and check time; record it as `completion_receipt.release` on a handoff that cites the mission. `released` is `verified` only when the connector confirms it itself (the target is `miadi-connector` and the running version is the one released); any other complete receipt within seven days is `receipt_recorded`, with who recorded it and whether that was the approver. Old checks are `stale`; a version string, a future date or an incomplete receipt is `claimed_unverified`. `closed` needs an approved `propose_session_completion` ending (`exit` or `complete_then_exit`) that names the mission in its `mission` field and ends one of the mission's sessions; a completed request is `request_completed`. A GitHub reference the connector cannot read is `unverified`, with the reason (`no_github_token`, `not_visible_to_token`…), never `not_found`.
|
|
58
58
|
|
|
59
|
-
**The factory binding (jgwill/Miadi#909).** The factory runner records every brief it hands to a seat in `delivered.jsonl`: the record, the tmux session, the pane id and the Claude Code session id that took the line. `mission_status` reads that receipt (write tier) and checks it against Miadi's session registry: `binding` is `verified` when both agree on session, tmux session and pane, `receipt_only` when the registry cannot confirm it, `unverified_association` when the registry places the session elsewhere or the pane is gone. Busy or idle comes from the registry when the binding is verified, else from a read-only peek of the bound pane, and is never read as completion. `mission_status` with `session:<uuid>` finds the one mission the factory delivered to that session (`factory_bound`); two are `ambiguous_mission`. `provider` names the provider requested, resolved and actually run, and `match: false` when they differ; nothing is re-run because of it. `get_session` lists the missions the factory delivered to the session.
|
|
59
|
+
**The factory binding (jgwill/Miadi#909).** The factory runner records every brief it hands to a seat in `delivered.jsonl`: the record, the tmux session, the pane id and the Claude Code session id that took the line. `mission_status` reads that receipt (write tier) and checks it against Miadi's session registry: `binding` is `verified` when both agree on session, tmux session and pane, `receipt_only` when the registry cannot confirm it, `unverified_association` when the registry places the session elsewhere or the pane is gone. Busy or idle comes from the registry when the binding is verified, else from a read-only peek of the bound pane, and is never read as completion. `mission_status` with `session:<uuid>` finds the one mission the factory delivered to that session (`factory_bound`); two are `ambiguous_mission`. `provider` names the provider requested, resolved and actually run, and `match: false` when they differ; nothing is re-run because of it. `get_session` lists the missions the factory delivered to the session (`binding: "factory_receipt"`), then the miadi-run missions Miadi links to it from their records and its inventory record (`binding: "miadi_run"`, jgwill/Miadi#993).
|
|
60
60
|
|
|
61
61
|
**The agent's result (jgwill/Miadi#921).** An agent returns its work with `propose_session_completion` naming the mission in `mission`, from its bound session, with its evidence refs and, optionally, a structured `result`: `summary`, `outputs` (`ref`, `label`, `git_sha`), `tests` (`command`, `passed`, `failed`, `skipped`) and `blockers`. `mission_status` and `get_run_result` read it back by the mission id as `result`: the standing submission (the newest `verified` one: it names the mission, ends a bound session and was submitted with Miadi's write tier or the factory's writer token, which the connector records on the ending as `submitted_with_tier`; anything else naming the mission is `unverified_association` with an `association_code`, a mere citation `cited_only` and never a result), its summary, tests and blockers as the agent's claim, and each output typed and checked when read. A commit or file on GitHub is read through GitHub (`GITHUB_TOKEN` when the host has one): `verified` with its sha, `changed_since_submission` when its declared `git_sha` no longer matches or the file changed on its branch after the submission, `unverified` with the reason when GitHub cannot be read, never `not_found`. A connector record id the ledger does not hold is `not_found`. Bound sessions are taken from the factory's receipts for every reader, so the verdict is the same at every tier; below the write tier the session ids are left out. The completion decision stays the person's, and only a verified submission sets it: `stage_truth.completion` is `pending_approval`, `accepted`, `declined` or `revision_requested` (`none` for an unverified one, whose stage is `result_submitted_unverified`; an approved exit submitted below the write tier closes nothing), `pending_human_gates` lists what waits on a person with its approval page, and `mission_stage` names the furthest stage with evidence (`result_submitted_awaiting_completion_approval`, `completion_accepted`, `merged`, `released`, `closed`…). A duplicate submission (same session, ending and mission, still pending) is handed back with `replayed: true`, and `not_recorded` names what the second call carried that was not kept.
|
|
62
62
|
|
package/dist/tools.js
CHANGED
|
@@ -561,7 +561,7 @@ export function registerTools(server, ctx) {
|
|
|
561
561
|
}));
|
|
562
562
|
server.registerTool("get_session", {
|
|
563
563
|
title: "One agent session",
|
|
564
|
-
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, and the connector records that cite it (handoffs, completion proposals).",
|
|
564
|
+
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).",
|
|
565
565
|
inputSchema: { session_id: z.string().min(8) },
|
|
566
566
|
annotations: READ,
|
|
567
567
|
}, wrap(async ({ session_id }, extra) => {
|
|
@@ -571,11 +571,16 @@ export function registerTools(server, ctx) {
|
|
|
571
571
|
const session = await miadi.get(person.token, `/api/session/${encodeURIComponent(id)}`);
|
|
572
572
|
// The missions the factory delivered to this session, by the runner's receipt (jgwill/Miadi#909).
|
|
573
573
|
const all = receipts();
|
|
574
|
-
const
|
|
574
|
+
const delivered = recordsForSession(all, id).map((record) => {
|
|
575
575
|
const rc = all.filter((x) => x.record === record && x.session_id === id).sort((a, b) => b.at.localeCompare(a.at))[0];
|
|
576
576
|
return { record, binding: "factory_receipt", delivered_at: rc?.at, tmux_session: rc?.tmux_session, pane_id: rc?.pane_id, read: `mission_status with ${record}` };
|
|
577
577
|
});
|
|
578
|
-
|
|
578
|
+
// Beside them, the miadi-run missions Miadi links to the session from their records and its inventory record (jgwill/Miadi#993).
|
|
579
|
+
const view = session?.session;
|
|
580
|
+
const runs = (Array.isArray(view?.missions) ? view.missions : [])
|
|
581
|
+
.filter((m) => typeof m?.id === "string")
|
|
582
|
+
.map((m) => ({ ...m, binding: "miadi_run" }));
|
|
583
|
+
return { ...session, missions: [...delivered, ...runs], connector_records: touching(`session:${id}`) };
|
|
579
584
|
}));
|
|
580
585
|
server.registerTool("get_evidence", {
|
|
581
586
|
title: "What an episode holds as evidence",
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.32";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.32";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/connector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"STEERING.md"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@miadi/inquiry-weave": "0.18.
|
|
46
|
+
"@miadi/inquiry-weave": "0.18.13",
|
|
47
47
|
"@miadi/node-service-kit": "0.1.2",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
49
49
|
"express": "^5.2.1",
|