@agenticprimitives/runtime-member 0.0.0-alpha.2
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/LICENSE +21 -0
- package/README.md +38 -0
- package/bin/ap-runtime.mjs +4 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +201 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +48 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +75 -0
- package/dist/client.js.map +1 -0
- package/dist/equip-entry.d.ts +8 -0
- package/dist/equip-entry.d.ts.map +1 -0
- package/dist/equip-entry.js +7 -0
- package/dist/equip-entry.js.map +1 -0
- package/dist/equip.d.ts +124 -0
- package/dist/equip.d.ts.map +1 -0
- package/dist/equip.js +173 -0
- package/dist/equip.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/join.d.ts +9 -0
- package/dist/join.d.ts.map +1 -0
- package/dist/join.js +32 -0
- package/dist/join.js.map +1 -0
- package/dist/keystore.d.ts +13 -0
- package/dist/keystore.d.ts.map +1 -0
- package/dist/keystore.js +60 -0
- package/dist/keystore.js.map +1 -0
- package/dist/loop.d.ts +78 -0
- package/dist/loop.d.ts.map +1 -0
- package/dist/loop.js +151 -0
- package/dist/loop.js.map +1 -0
- package/dist/messaging.d.ts +19 -0
- package/dist/messaging.d.ts.map +1 -0
- package/dist/messaging.js +51 -0
- package/dist/messaging.js.map +1 -0
- package/dist/pair.d.ts +19 -0
- package/dist/pair.d.ts.map +1 -0
- package/dist/pair.js +51 -0
- package/dist/pair.js.map +1 -0
- package/dist/pairing.d.ts +61 -0
- package/dist/pairing.d.ts.map +1 -0
- package/dist/pairing.js +4 -0
- package/dist/pairing.js.map +1 -0
- package/dist/record.d.ts +33 -0
- package/dist/record.d.ts.map +1 -0
- package/dist/record.js +2 -0
- package/dist/record.js.map +1 -0
- package/dist/run.d.ts +8 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +24 -0
- package/dist/run.js.map +1 -0
- package/dist/serve.d.ts +26 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/serve.js +51 -0
- package/dist/serve.js.map +1 -0
- package/dist/standing.d.ts +58 -0
- package/dist/standing.d.ts.map +1 -0
- package/dist/standing.js +65 -0
- package/dist/standing.js.map +1 -0
- package/dist/workspace-mcp.d.ts +88 -0
- package/dist/workspace-mcp.d.ts.map +1 -0
- package/dist/workspace-mcp.js +129 -0
- package/dist/workspace-mcp.js.map +1 -0
- package/package.json +52 -0
- package/spec.md +10 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Address, type Hex } from 'viem';
|
|
2
|
+
import { type MandateRequirementV1 } from '@agenticprimitives/delegation';
|
|
3
|
+
import type { Signer } from './client.js';
|
|
4
|
+
/** The enforcer addresses a standing grant and its children are written against. */
|
|
5
|
+
export interface StandingEnforcers {
|
|
6
|
+
timestamp: Address;
|
|
7
|
+
allowedMethods: Address;
|
|
8
|
+
value: Address;
|
|
9
|
+
allowedTargets: Address;
|
|
10
|
+
digestBinding: Address;
|
|
11
|
+
}
|
|
12
|
+
export interface StandingGrantV1 {
|
|
13
|
+
v: 1;
|
|
14
|
+
/** The standing delegation: member SA → the runtime's key, signed by the member's custodian. Wire-shaped (salt as a string). */
|
|
15
|
+
wire: Record<string, unknown>;
|
|
16
|
+
ref: Hex;
|
|
17
|
+
/** What it allows, as the handler reads it — the parent requirement `deriveMandate` bounds a child by. */
|
|
18
|
+
requirement: Omit<MandateRequirementV1, 'intentDigest'>;
|
|
19
|
+
enforcers: StandingEnforcers;
|
|
20
|
+
chainId: number;
|
|
21
|
+
delegationManager: Address;
|
|
22
|
+
grantedAt: string;
|
|
23
|
+
}
|
|
24
|
+
export interface BuildStandingInput {
|
|
25
|
+
member: Address;
|
|
26
|
+
runtimeKey: Address;
|
|
27
|
+
capabilities: string[];
|
|
28
|
+
/** The LOCATIONS the grant is bounded to — for `messaging.direct.send` the recipients it may write to (the
|
|
29
|
+
* capability's resource is who is messaged; the sender is the delegator). Omitted: any location, as itself. */
|
|
30
|
+
locations?: Address[];
|
|
31
|
+
validForSeconds: number;
|
|
32
|
+
enforcers: StandingEnforcers;
|
|
33
|
+
chainId: number;
|
|
34
|
+
delegationManager: Address;
|
|
35
|
+
/** The member's custodian — the only party who can grant. A port; the key is never here. */
|
|
36
|
+
signDigest: Signer;
|
|
37
|
+
}
|
|
38
|
+
/** The standing grant, signed by the custodian. No intent binding — that is what makes it standing. */
|
|
39
|
+
export declare function buildStandingGrant(i: BuildStandingInput): Promise<StandingGrantV1>;
|
|
40
|
+
/** What a parked run said it needs — read off the AUTH_REQUIRED task's data part. */
|
|
41
|
+
export interface ParkedNeed {
|
|
42
|
+
requirement: MandateRequirementV1;
|
|
43
|
+
delegator: Address;
|
|
44
|
+
delegate: Address;
|
|
45
|
+
}
|
|
46
|
+
export declare function parkedNeedOf(data: unknown): ParkedNeed | null;
|
|
47
|
+
export type Derived = {
|
|
48
|
+
ok: true;
|
|
49
|
+
presented: Array<Record<string, unknown>>;
|
|
50
|
+
childRef: Hex;
|
|
51
|
+
} | {
|
|
52
|
+
ok: false;
|
|
53
|
+
reason: string;
|
|
54
|
+
};
|
|
55
|
+
/** The child for THIS intent, from the standing grant, signed with the runtime's key — or why not. The run's need must
|
|
56
|
+
* be an act OF the member (delegator = the member) and ⊆ the grant; anything else stays parked for the steward. */
|
|
57
|
+
export declare function deriveForNeed(standing: StandingGrantV1, need: ParkedNeed, member: Address, sign: Signer): Promise<Derived>;
|
|
58
|
+
//# sourceMappingURL=standing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standing.d.ts","sourceRoot":"","sources":["../src/standing.ts"],"names":[],"mappings":"AAcA,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AACrD,O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AC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE;AAExG,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAK7D;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7H;oHACoH;AACpH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAoBhI"}
|
package/dist/standing.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// THE OPEN MANDATE (spec 400 W2a) — what makes a hosted runtime feel live without lending it anyone's session.
|
|
2
|
+
//
|
|
3
|
+
// Every write a runtime attempts parks for the steward's signature (§5.3). For ONE capability the steward may decide
|
|
4
|
+
// once instead of every time: she signs a STANDING GRANT — a delegation from the member's Smart Agent to the runtime's
|
|
5
|
+
// own key, `messaging.direct.send` at the member, time-bounded, no value, and (the whole point) NO intent binding —
|
|
6
|
+
// which is a capability, not a mandate (delegation/mandate.ts). When a reply then parks, the runtime DERIVES the
|
|
7
|
+
// mandate the run asked for: a child of the standing grant bound to exactly that intent digest (`deriveMandate`,
|
|
8
|
+
// subset-checked), signs it with its own key, and continues the same run presenting the chain [child, standing]. The
|
|
9
|
+
// harness verifies every link (the standing grant's signature against the member's SA, its revocation on chain, the
|
|
10
|
+
// child ⊆ parent, the intent binding) before the step acts — as it would a steward's one-prompt approval. Revoke the
|
|
11
|
+
// standing grant on chain and the next derivation is refused everywhere; the runtime never held a pen of anyone's.
|
|
12
|
+
//
|
|
13
|
+
// What this is NOT: a session, a bearer, a "trusted runtime" flag, or a pre-approval of anything but the named
|
|
14
|
+
// capability at the named agent within the window. A commit, an allocation, a payment still park.
|
|
15
|
+
import { toHex } from 'viem';
|
|
16
|
+
import { capabilityHandler, deriveMandate, hashDelegation, CAPABILITY_RAR_TYPE, DEFAULT_SUBSET_HANDLERS, ROOT_AUTHORITY } from '@agenticprimitives/delegation';
|
|
17
|
+
/** The standing grant, signed by the custodian. No intent binding — that is what makes it standing. */
|
|
18
|
+
export async function buildStandingGrant(i) {
|
|
19
|
+
if (!i.capabilities.length)
|
|
20
|
+
throw new Error('a standing grant names at least one capability');
|
|
21
|
+
const now = Math.floor(Date.now() / 1000);
|
|
22
|
+
const requirement = { type: CAPABILITY_RAR_TYPE, actions: i.capabilities, ...(i.locations?.length ? { locations: i.locations.map((l) => l.toLowerCase()) } : {}), validAfter: now - 60, validUntil: now + i.validForSeconds };
|
|
23
|
+
const caveats = capabilityHandler.toCaveats(requirement, i.enforcers);
|
|
24
|
+
const salt = BigInt(toHex(crypto.getRandomValues(new Uint8Array(16))));
|
|
25
|
+
const d = { delegator: i.member, delegate: i.runtimeKey, authority: ROOT_AUTHORITY, caveats, salt, signature: '0x' };
|
|
26
|
+
const ref = hashDelegation(d, i.chainId, i.delegationManager);
|
|
27
|
+
d.signature = await i.signDigest(ref);
|
|
28
|
+
return { v: 1, wire: { ...d, salt: salt.toString() }, ref, requirement, enforcers: i.enforcers, chainId: i.chainId, delegationManager: i.delegationManager, grantedAt: new Date().toISOString() };
|
|
29
|
+
}
|
|
30
|
+
export function parkedNeedOf(data) {
|
|
31
|
+
const d = data;
|
|
32
|
+
if (!d?.requirement || typeof d.requirement !== 'object' || !d.delegator || !d.delegate)
|
|
33
|
+
return null;
|
|
34
|
+
if (typeof d.requirement.intentDigest !== 'string' || !Array.isArray(d.requirement.actions))
|
|
35
|
+
return null;
|
|
36
|
+
return { requirement: d.requirement, delegator: d.delegator, delegate: d.delegate };
|
|
37
|
+
}
|
|
38
|
+
/** The child for THIS intent, from the standing grant, signed with the runtime's key — or why not. The run's need must
|
|
39
|
+
* be an act OF the member (delegator = the member) and ⊆ the grant; anything else stays parked for the steward. */
|
|
40
|
+
export async function deriveForNeed(standing, need, member, sign) {
|
|
41
|
+
if (need.delegator.toLowerCase() !== member.toLowerCase())
|
|
42
|
+
return { ok: false, reason: `the run needs an act of ${need.delegator}, not of ${member}` };
|
|
43
|
+
if (need.requirement.type !== CAPABILITY_RAR_TYPE)
|
|
44
|
+
return { ok: false, reason: `the run needs a ${need.requirement.type} mandate; the standing grant is a capability` };
|
|
45
|
+
const parent = { ...standing.wire, salt: BigInt(String(standing.wire.salt)) };
|
|
46
|
+
const salt = BigInt(toHex(crypto.getRandomValues(new Uint8Array(16))));
|
|
47
|
+
// The child's window is the run's need CLAMPED into the grant's: a mandate narrower in time than the run asked for
|
|
48
|
+
// still covers this moment, and a child may never outlive its parent. Outside the grant's window altogether → refused.
|
|
49
|
+
const validAfter = Math.max(need.requirement.validAfter ?? 0, standing.requirement.validAfter ?? 0);
|
|
50
|
+
const validUntil = Math.min(need.requirement.validUntil, standing.requirement.validUntil);
|
|
51
|
+
const now = Math.floor(Date.now() / 1000);
|
|
52
|
+
if (validAfter > now || validUntil <= now)
|
|
53
|
+
return { ok: false, reason: `the standing grant's window (until ${new Date(standing.requirement.validUntil * 1000).toISOString().slice(0, 16)}) does not cover now` };
|
|
54
|
+
const out = deriveMandate({
|
|
55
|
+
parent, parentRequirement: { ...standing.requirement, intentDigest: need.requirement.intentDigest },
|
|
56
|
+
requirement: { ...need.requirement, validAfter, validUntil }, grantee: need.delegate, enforcers: standing.enforcers, chainId: standing.chainId, delegationManager: standing.delegationManager, salt,
|
|
57
|
+
handlers: DEFAULT_SUBSET_HANDLERS, // the capability handler, explicitly — the ambient registry is the harness's to fill
|
|
58
|
+
});
|
|
59
|
+
if (!out.ok)
|
|
60
|
+
return { ok: false, reason: out.reason };
|
|
61
|
+
const signature = await sign(out.digest);
|
|
62
|
+
const child = { ...out.delegation, signature, salt: salt.toString() };
|
|
63
|
+
return { ok: true, presented: [child, standing.wire], childRef: out.digest };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=standing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standing.js","sourceRoot":"","sources":["../src/standing.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,oHAAoH;AACpH,iHAAiH;AACjH,iHAAiH;AACjH,qHAAqH;AACrH,oHAAoH;AACpH,qHAAqH;AACrH,mHAAmH;AACnH,EAAE;AACF,+GAA+G;AAC/G,kGAAkG;AAClG,OAAO,EAAE,KAAK,EAA0B,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,cAAc,EAA8C,MAAM,+BAA+B,CAAC;AAkC3M,uGAAuG;AACvG,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,CAAqB;IAC5D,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC9F,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,WAAW,GAA+C,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,GAAG,C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AO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,KAA2C,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;AACrH,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { MethodRegistry, type JsonRpcResponse } from '@agenticprimitives/mcp-protocol';
|
|
2
|
+
import { type AskOutcome, type Plan } from './client.js';
|
|
3
|
+
import { type RuntimeMemberRecordV1 } from './keystore.js';
|
|
4
|
+
export declare const WORKSPACE_MCP_DOCTRINE = "You are a MEMBER of a workspace, acting as your own service agent. These tools reach the workspace as you:\n- workspace_ask: ask the workspace (or any agent by name) something. A read answers from records under your membership; an act you have no authority for PARKS for the steward's signature \u2014 the result tells you the run reference. Do not retry a parked act; say it is waiting.\n- workspace_reply: send a direct message as yourself. Sending is an act: it parks for the steward's signature too, and the result says so.\n- workspace_inbox: what has been said to you since a cursor \u2014 your own inbox.\n- workspace_status: the state of a run you started (by task id).\nA permission prompt on your own machine is not authority in the workspace. Nothing you do here is ever done \"as\" a person.";
|
|
5
|
+
export declare const inboxPlan: (since?: string, limit?: number) => Plan;
|
|
6
|
+
export declare const replyPlan: (to: string, text: string) => Plan;
|
|
7
|
+
/** Spec 400 W2 (B3) — a reply IN THE TOPIC a mention came from (the thread `conv_topic-<org>-<channelId>`). */
|
|
8
|
+
export declare const topicReplyPlan: (org: string, channelId: string, text: string) => Plan;
|
|
9
|
+
/** A topic thread, parsed off a conversation id (mirrors the Worker's `topicThreadId`). */
|
|
10
|
+
export declare function topicOf(conversationId: string | undefined): {
|
|
11
|
+
org: string;
|
|
12
|
+
channelId: string;
|
|
13
|
+
} | null;
|
|
14
|
+
/** Words for an outcome the agent can act on — parked is said as parked. */
|
|
15
|
+
export declare function describeOutcome(o: AskOutcome): string;
|
|
16
|
+
export interface WorkspaceMcpOptions {
|
|
17
|
+
record: RuntimeMemberRecordV1;
|
|
18
|
+
fetch?: typeof fetch;
|
|
19
|
+
}
|
|
20
|
+
export declare function createWorkspaceMcp(o: WorkspaceMcpOptions): {
|
|
21
|
+
registry: MethodRegistry;
|
|
22
|
+
handle: (raw: string) => Promise<JsonRpcResponse | null>;
|
|
23
|
+
tools: readonly [{
|
|
24
|
+
readonly name: "workspace_ask";
|
|
25
|
+
readonly description: "Ask the workspace, or any agent by typed name, as yourself. Reads answer under your membership; acts park for the steward's mandate (the result names the run).";
|
|
26
|
+
readonly inputSchema: {
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly properties: {
|
|
29
|
+
readonly message: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
};
|
|
32
|
+
readonly addressee: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly description: "A typed name (soup-kitchen.org, mara.me). Default: your workspace.";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly required: readonly ["message"];
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "workspace_reply";
|
|
41
|
+
readonly description: "Send a direct message as yourself. An act: it parks for the steward's signature; the result says so.";
|
|
42
|
+
readonly inputSchema: {
|
|
43
|
+
readonly type: "object";
|
|
44
|
+
readonly properties: {
|
|
45
|
+
readonly to: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly description: "A typed name or address";
|
|
48
|
+
};
|
|
49
|
+
readonly text: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly required: readonly ["to", "text"];
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "workspace_inbox";
|
|
57
|
+
readonly description: "What has been said to you since a cursor — your own inbox. Pass the returned cursor next time.";
|
|
58
|
+
readonly inputSchema: {
|
|
59
|
+
readonly type: "object";
|
|
60
|
+
readonly properties: {
|
|
61
|
+
readonly since: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
};
|
|
64
|
+
readonly limit: {
|
|
65
|
+
readonly type: "integer";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "workspace_status";
|
|
71
|
+
readonly description: "The state of a run you started, by its task id.";
|
|
72
|
+
readonly inputSchema: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly taskId: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
};
|
|
78
|
+
readonly addressee: {
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly required: readonly ["taskId"];
|
|
83
|
+
};
|
|
84
|
+
}];
|
|
85
|
+
};
|
|
86
|
+
/** stdio: one message per line in, one per line out; nothing else on stdout (the agent is parsing it). */
|
|
87
|
+
export declare function runWorkspaceMcpStdio(memberName: string): Promise<void>;
|
|
88
|
+
//# sourceMappingURL=workspace-mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-mcp.d.ts","sourceRoot":"","sources":["../src/workspace-mcp.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACO,KAAK,eAAe,EAC1C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAS,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAK9E,eAAO,MAAM,sBAAsB,wyBAKwF,CAAC;AAS5H,eAAO,MAAM,SAAS,WAAY,MAAM,UAAU,MAAM,KAAG,IAA6H,CAAC;AACzL,eAAO,MAAM,SAAS,OAAQ,MAAM,QAAQ,MAAM,KAAG,IAAkG,CAAC;AACxJ,+GAA+G;AAC/G,eAAO,MAAM,cAAc,QAAS,MAAM,aAAa,MAAM,QAAQ,MAAM,KAAG,IAAkG,CAAC;AAEjL,2FAA2F;AAC3F,wBAAgB,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAGrG;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAKrD;AAED,MAAM,WAAW,mBAAmB;IAAG,MAAM,EAAE,qBAAqB,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CAAE;AAE5F,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,mBAAmB;;kBAgD5B,MAAM,KAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcpE;AAED,0GAA0G;AAC1G,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ5E"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// THE WORKSPACE AS TOOLS — the MCP server an ACP agent spawns for its session (`session/new`'s `mcpServers`), so the
|
|
2
|
+
// workspace reaches the agent as tools it already knows how to call. Every tool here is ONE wire-signed A2A request
|
|
3
|
+
// as the runtime itself (spec 372 S3c); nothing here decides anything: a read answers against the member's standing,
|
|
4
|
+
// a write parks for the steward's mandate — and the tool result says so, in words ("parked: run <ref> waits for the
|
|
5
|
+
// steward's signature"), which is the honest answer, not a refusal and not a click (spec 400 §5.1).
|
|
6
|
+
//
|
|
7
|
+
// stdio, one JSON-RPC message per line — the shape the devkit's Developer MCP uses; nothing but protocol on stdout.
|
|
8
|
+
import { createInterface } from 'node:readline';
|
|
9
|
+
import { MethodRegistry, RpcError, RPC_ERROR, SUPPORTED_PROTOCOL_VERSIONS, buildServerDiscover, negotiateProtocolVersion, parseJsonRpc, parseRequestMeta, } from '@agenticprimitives/mcp-protocol';
|
|
10
|
+
import { askAs } from './client.js';
|
|
11
|
+
import { loadRuntimeMember } from './keystore.js';
|
|
12
|
+
const SERVER_INFO = { name: 'agenticprimitives-workspace-mcp', version: '0.1.0', title: 'Agentic Primitives — the workspace, as the runtime member sees it' };
|
|
13
|
+
const CAPABILITIES = { tools: { listChanged: false }, resources: { listChanged: false, subscribe: false } };
|
|
14
|
+
export const WORKSPACE_MCP_DOCTRINE = `You are a MEMBER of a workspace, acting as your own service agent. These tools reach the workspace as you:
|
|
15
|
+
- workspace_ask: ask the workspace (or any agent by name) something. A read answers from records under your membership; an act you have no authority for PARKS for the steward's signature — the result tells you the run reference. Do not retry a parked act; say it is waiting.
|
|
16
|
+
- workspace_reply: send a direct message as yourself. Sending is an act: it parks for the steward's signature too, and the result says so.
|
|
17
|
+
- workspace_inbox: what has been said to you since a cursor — your own inbox.
|
|
18
|
+
- workspace_status: the state of a run you started (by task id).
|
|
19
|
+
A permission prompt on your own machine is not authority in the workspace. Nothing you do here is ever done "as" a person.`;
|
|
20
|
+
const TOOLS = [
|
|
21
|
+
{ name: 'workspace_ask', description: 'Ask the workspace, or any agent by typed name, as yourself. Reads answer under your membership; acts park for the steward\'s mandate (the result names the run).', inputSchema: { type: 'object', properties: { message: { type: 'string' }, addressee: { type: 'string', description: 'A typed name (soup-kitchen.org, mara.me). Default: your workspace.' } }, required: ['message'] } },
|
|
22
|
+
{ name: 'workspace_reply', description: 'Send a direct message as yourself. An act: it parks for the steward\'s signature; the result says so.', inputSchema: { type: 'object', properties: { to: { type: 'string', description: 'A typed name or address' }, text: { type: 'string' } }, required: ['to', 'text'] } },
|
|
23
|
+
{ name: 'workspace_inbox', description: 'What has been said to you since a cursor — your own inbox. Pass the returned cursor next time.', inputSchema: { type: 'object', properties: { since: { type: 'string' }, limit: { type: 'integer' } } } },
|
|
24
|
+
{ name: 'workspace_status', description: 'The state of a run you started, by its task id.', inputSchema: { type: 'object', properties: { taskId: { type: 'string' }, addressee: { type: 'string' } }, required: ['taskId'] } },
|
|
25
|
+
];
|
|
26
|
+
export const inboxPlan = (since, limit) => ({ steps: [{ toolId: 'messaging.inbox.list', args: { ...(since ? { since } : {}), ...(limit ? { limit } : {}) } }] });
|
|
27
|
+
export const replyPlan = (to, text) => ({ steps: [{ toolId: 'messaging.direct.send', args: { recipient: to, message: text } }] });
|
|
28
|
+
/** Spec 400 W2 (B3) — a reply IN THE TOPIC a mention came from (the thread `conv_topic-<org>-<channelId>`). */
|
|
29
|
+
export const topicReplyPlan = (org, channelId, text) => ({ steps: [{ toolId: 'messaging.topic.post', args: { org, channelId, message: text } }] });
|
|
30
|
+
/** A topic thread, parsed off a conversation id (mirrors the Worker's `topicThreadId`). */
|
|
31
|
+
export function topicOf(conversationId) {
|
|
32
|
+
const m = /^conv_topic-(0x[0-9a-f]{40})-(.+)$/i.exec(conversationId ?? '');
|
|
33
|
+
return m ? { org: m[1].toLowerCase(), channelId: m[2] } : null;
|
|
34
|
+
}
|
|
35
|
+
/** Words for an outcome the agent can act on — parked is said as parked. */
|
|
36
|
+
export function describeOutcome(o) {
|
|
37
|
+
if (o.state === 'ERROR')
|
|
38
|
+
return `failed: ${o.text}`;
|
|
39
|
+
if (o.parked)
|
|
40
|
+
return `parked: run ${o.runRef ?? o.taskId ?? '?'} waits for the steward's signature at their Home — ${o.text || 'the act needs a mandate you do not hold'}. Do not retry; say it is waiting.`;
|
|
41
|
+
if (o.state === 'TASK_STATE_REJECTED' || o.state === 'TASK_STATE_FAILED')
|
|
42
|
+
return `refused: ${o.text || o.state}`;
|
|
43
|
+
return o.text || (o.data !== undefined ? JSON.stringify(o.data) : o.state);
|
|
44
|
+
}
|
|
45
|
+
export function createWorkspaceMcp(o) {
|
|
46
|
+
const rec = o.record;
|
|
47
|
+
const call = async (name, args) => {
|
|
48
|
+
const target = typeof args.addressee === 'string' && args.addressee.trim() ? args.addressee.trim() : rec.workspace.name;
|
|
49
|
+
switch (name) {
|
|
50
|
+
case 'workspace_ask': {
|
|
51
|
+
const out = await askAs(rec, target, String(args.message ?? ''), { fetch: o.fetch });
|
|
52
|
+
return { said: describeOutcome(out), state: out.state, ...(out.runRef ? { runRef: out.runRef } : {}), ...(out.taskId ? { taskId: out.taskId } : {}), parked: out.parked, ...(out.data !== undefined ? { data: out.data } : {}) };
|
|
53
|
+
}
|
|
54
|
+
case 'workspace_reply': {
|
|
55
|
+
const to = String(args.to ?? '');
|
|
56
|
+
const text = String(args.text ?? '');
|
|
57
|
+
if (!to || !text)
|
|
58
|
+
throw new RpcError(RPC_ERROR.INVALID_PARAMS, 'to and text are required');
|
|
59
|
+
const out = await askAs(rec, rec.name, `send ${to} a message: ${text}`, { plan: replyPlan(to, text), fetch: o.fetch });
|
|
60
|
+
return { said: describeOutcome(out), state: out.state, ...(out.runRef ? { runRef: out.runRef } : {}), ...(out.taskId ? { taskId: out.taskId } : {}), parked: out.parked };
|
|
61
|
+
}
|
|
62
|
+
case 'workspace_inbox': {
|
|
63
|
+
const since = typeof args.since === 'string' ? args.since : undefined;
|
|
64
|
+
const limit = typeof args.limit === 'number' ? args.limit : undefined;
|
|
65
|
+
const out = await askAs(rec, rec.name, `what's new for me${since ? ` since ${since}` : ''}`, { plan: inboxPlan(since, limit), fetch: o.fetch });
|
|
66
|
+
return out.data ?? { said: out.text, state: out.state };
|
|
67
|
+
}
|
|
68
|
+
case 'workspace_status': {
|
|
69
|
+
const { clientFor } = await import('./client.js');
|
|
70
|
+
const task = await clientFor(rec, target, { fetch: o.fetch }).getTask(String(args.taskId ?? ''));
|
|
71
|
+
return { state: task.status.state, said: task.status.message?.parts?.map((p) => p.text).filter(Boolean).join('\n') ?? '', runRef: task.metadata?.runRef ?? null };
|
|
72
|
+
}
|
|
73
|
+
default: throw new RpcError(RPC_ERROR.INVALID_PARAMS, `unknown tool ${name}`);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const registry = new MethodRegistry()
|
|
77
|
+
.register('server/discover', () => buildServerDiscover({ serverInfo: SERVER_INFO, capabilities: CAPABILITIES }))
|
|
78
|
+
.register('tools/list', () => ({ tools: TOOLS }))
|
|
79
|
+
.register('resources/list', () => ({ resources: [{ uri: 'ap://workspace/doctrine', name: 'What these tools are and are not', mimeType: 'text/plain' }] }))
|
|
80
|
+
.register('resources/read', (params) => {
|
|
81
|
+
if (String(params?.uri ?? '') !== 'ap://workspace/doctrine')
|
|
82
|
+
throw new RpcError(RPC_ERROR.INVALID_PARAMS, 'unknown resource');
|
|
83
|
+
return { contents: [{ uri: 'ap://workspace/doctrine', mimeType: 'text/plain', text: WORKSPACE_MCP_DOCTRINE }] };
|
|
84
|
+
})
|
|
85
|
+
.register('tools/call', async (params) => {
|
|
86
|
+
const name = String(params?.name ?? '');
|
|
87
|
+
const args = params?.arguments ?? {};
|
|
88
|
+
try {
|
|
89
|
+
const out = await call(name, args);
|
|
90
|
+
return { content: [{ type: 'text', text: typeof out === 'string' ? out : JSON.stringify(out, null, 2) }], structuredContent: (typeof out === 'object' && out ? out : { value: out }), isError: false };
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
if (e instanceof RpcError)
|
|
94
|
+
return { content: [{ type: 'text', text: e.message }], isError: true };
|
|
95
|
+
return { content: [{ type: 'text', text: `the workspace could not be reached: ${e instanceof Error ? e.message : String(e)}` }], isError: true };
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const handle = async (raw) => {
|
|
99
|
+
const parsed = parseJsonRpc(raw);
|
|
100
|
+
if (!parsed.ok)
|
|
101
|
+
return parsed.res;
|
|
102
|
+
const req = parsed.req;
|
|
103
|
+
const meta = parseRequestMeta(req.params?._meta, undefined);
|
|
104
|
+
const requested = typeof req.params?.protocolVersion === 'string' ? req.params.protocolVersion : meta.protocolVersion;
|
|
105
|
+
const version = negotiateProtocolVersion(requested) ?? SUPPORTED_PROTOCOL_VERSIONS[0];
|
|
106
|
+
const id = req.id ?? null;
|
|
107
|
+
if (req.method === 'initialize')
|
|
108
|
+
return { jsonrpc: '2.0', id, result: { protocolVersion: version, capabilities: CAPABILITIES, serverInfo: SERVER_INFO, instructions: WORKSPACE_MCP_DOCTRINE } };
|
|
109
|
+
if (req.method === 'notifications/initialized')
|
|
110
|
+
return null;
|
|
111
|
+
if (req.method === 'ping')
|
|
112
|
+
return { jsonrpc: '2.0', id, result: {} };
|
|
113
|
+
return registry.dispatch(req, { meta, protocolVersion: version, raw });
|
|
114
|
+
};
|
|
115
|
+
return { registry, handle, tools: TOOLS };
|
|
116
|
+
}
|
|
117
|
+
/** stdio: one message per line in, one per line out; nothing else on stdout (the agent is parsing it). */
|
|
118
|
+
export async function runWorkspaceMcpStdio(memberName) {
|
|
119
|
+
const { handle } = createWorkspaceMcp({ record: loadRuntimeMember(memberName) });
|
|
120
|
+
const rl = createInterface({ input: process.stdin, crlfDelay: Infinity });
|
|
121
|
+
for await (const line of rl) {
|
|
122
|
+
if (!line.trim())
|
|
123
|
+
continue;
|
|
124
|
+
const res = await handle(line);
|
|
125
|
+
if (res)
|
|
126
|
+
process.stdout.write(`${JSON.stringify(res)}\n`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=workspace-mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-mcp.js","sourceRoot":"","sources":["../src/workspace-mcp.ts"],"names":[],"mappings":"AAAA,qHAAqH;AACrH,oHAAoH;AACpH,qHAAqH;AACrH,oHAAoH;AACpH,oGAAoG;AACpG,EAAE;AACF,oHAAoH;AACpH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,YAAY,EAAE,gBAAgB,GAEhJ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,EAA8B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAA8B,MAAM,eAAe,CAAC;AAE9E,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,mEA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,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAqB,CAAC;QACxF,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IACzE,CAAC,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC5C,CAAC;AAED,0GAA0G;AAC1G,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAkB;IAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,kBAAkB,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACjF,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1E,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,SAAS;QAC3B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,GAAG;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agenticprimitives/runtime-member",
|
|
3
|
+
"version": "0.0.0-alpha.2",
|
|
4
|
+
"description": "ADMISSION of an existing general-purpose runtime as a workspace MEMBER, without a rewrite (spec 400 W1 — admission, not 'add coding'): `ap runtime join` (the .svc member's key and session wire, its steward link and playbook), `ap runtime mcp` (the workspace as MCP tools — every call one wire-signed A2A request as the runtime itself), `ap runtime run` (the loop: poll the member's own inbox, prompt the ACP agent, answer where it came from; every write parks for the steward's mandate).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./equip": {
|
|
12
|
+
"types": "./dist/equip-entry.d.ts",
|
|
13
|
+
"import": "./dist/equip-entry.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"ap-runtime": "./bin/ap-runtime.mjs"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"dist",
|
|
22
|
+
"spec.md",
|
|
23
|
+
"README.md",
|
|
24
|
+
"bin"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@agenticprimitives/a2a": "0.0.0-alpha.23",
|
|
28
|
+
"@agenticprimitives/contracts": "1.0.0-alpha.25",
|
|
29
|
+
"@agenticprimitives/mcp-protocol": "0.0.0-alpha.3",
|
|
30
|
+
"@agenticprimitives/delegation": "1.0.0-alpha.25",
|
|
31
|
+
"@agenticprimitives/acp": "0.0.0-alpha.2",
|
|
32
|
+
"@agenticprimitives/types": "1.0.0-alpha.25"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"viem": "^2.52.2"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"viem": "^2.52.2",
|
|
39
|
+
"vitest": "^4.1.8"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc -p tsconfig.build.json",
|
|
47
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:unit": "vitest run test/unit --passWithNoTests",
|
|
50
|
+
"clean": "rm -rf dist"
|
|
51
|
+
}
|
|
52
|
+
}
|
package/spec.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @agenticprimitives/runtime-member — package spec
|
|
2
|
+
|
|
3
|
+
Spec of record: [specs/400-closing-the-workspace-gap-buzz-and-team-agent-platforms.md](../../specs/400-closing-the-workspace-gap-buzz-and-team-agent-platforms.md) §5
|
|
4
|
+
(W1), on [specs/372-standard-a2a-surface-conformance-and-outsiders.md](../../specs/372-standard-a2a-surface-conformance-and-outsiders.md) S3.
|
|
5
|
+
|
|
6
|
+
Owns the runtime member's keystore, join (key + custodian-signed session wire + steward link + playbook), the workspace
|
|
7
|
+
MCP server the ACP agent spawns (four tools, each one wire-signed A2A request as the runtime), and the run loop (poll
|
|
8
|
+
the member's own inbox with a supplied plan; prompt; reply as itself — the reply parks for the steward's mandate).
|
|
9
|
+
Owns no authority: it signs requests with the runtime's key under a wire the custodian signed; it holds no session
|
|
10
|
+
and presents no mandate. Depends inward on `acp`, `a2a/standard`, `delegation` (to build the wire), `mcp-protocol`.
|