@tangle-network/agent-app 0.41.6 → 0.42.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/README.md +1 -2
- package/dist/{chunk-KNUS7KVM.js → chunk-MY75I367.js} +30 -45
- package/dist/chunk-MY75I367.js.map +1 -0
- package/dist/{chunk-OC3RAUZ2.js → chunk-OSMNYPOG.js} +1 -9
- package/dist/chunk-OSMNYPOG.js.map +1 -0
- package/dist/{chunk-FJUOBNIY.js → chunk-WOVCWPFF.js} +1 -1
- package/dist/config/index.d.ts +1 -23
- package/dist/config/index.js +1 -1
- package/dist/design-canvas-react/index.js +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +10 -20
- package/dist/sandbox/index.js +1 -1
- package/package.json +1 -6
- package/dist/chunk-AQ2BOPOQ.js +0 -39
- package/dist/chunk-AQ2BOPOQ.js.map +0 -1
- package/dist/chunk-KNUS7KVM.js.map +0 -1
- package/dist/chunk-OC3RAUZ2.js.map +0 -1
- package/dist/delegation/index.d.ts +0 -65
- package/dist/delegation/index.js +0 -13
- package/dist/delegation/index.js.map +0 -1
- /package/dist/{chunk-FJUOBNIY.js.map → chunk-WOVCWPFF.js.map} +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Delegated looped work — the agent-runtime "driven loop" MCP.
|
|
3
|
-
*
|
|
4
|
-
* For multi-step research or document generation, the agent dispatches a loop
|
|
5
|
-
* that runs to completion in its OWN sandbox (via @tangle-network/agent-runtime's
|
|
6
|
-
* stdio MCP, executed in the agent-driver) and returns the artifact. This is
|
|
7
|
-
* how an app's main agent "programs / delegates" without doing long mechanical
|
|
8
|
-
* work inline. It is an OPTIONAL module — an app opts in by spreading the
|
|
9
|
-
* server into its profile's `mcp` map.
|
|
10
|
-
*
|
|
11
|
-
* The shape is the portable `AgentProfileMcpServer` the sandbox SDK accepts
|
|
12
|
-
* (transport: 'stdio' → the orchestrator derives `{ type:'local', command }`).
|
|
13
|
-
* Kept structural here so this package needs no sandbox-SDK dependency.
|
|
14
|
-
*/
|
|
15
|
-
declare const DELEGATION_MCP_SERVER_KEY = "agent-runtime-delegation";
|
|
16
|
-
declare const DELEGATION_TOOLS: readonly ["delegate_code", "delegate_research", "delegate_feedback", "delegation_status", "delegation_history"];
|
|
17
|
-
/** The stdio MCP server entry — structurally an `AgentProfileMcpServer`. */
|
|
18
|
-
interface DelegationMcpServer {
|
|
19
|
-
transport: 'stdio';
|
|
20
|
-
command: string;
|
|
21
|
-
args: string[];
|
|
22
|
-
env: Record<string, string>;
|
|
23
|
-
enabled: true;
|
|
24
|
-
metadata: {
|
|
25
|
-
surface: string;
|
|
26
|
-
tools: readonly string[];
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
interface BuildDelegationOptions {
|
|
30
|
-
/** Platform API key the delegated loop authenticates with (required — the
|
|
31
|
-
* loop runs in its own sandbox and bills against this key). Omit/empty →
|
|
32
|
-
* returns undefined (fail-closed: no key, no delegation). */
|
|
33
|
-
apiKey?: string;
|
|
34
|
-
/** Extra env to forward into the delegated loop (sandbox base URL, OTel trace
|
|
35
|
-
* propagation, etc.). Only defined values are forwarded. */
|
|
36
|
-
forwardEnv?: Record<string, string | undefined>;
|
|
37
|
-
/** npm spec for the runtime MCP. Defaults to the published agent-runtime. */
|
|
38
|
-
packageSpec?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Build the delegation MCP server entry, keyed under
|
|
42
|
-
* {@link DELEGATION_MCP_SERVER_KEY}, or `undefined` when no platform API key is
|
|
43
|
-
* available. Spread the result into the profile's `mcp` map:
|
|
44
|
-
*
|
|
45
|
-
* const delegation = buildDelegationMcpServer({ apiKey: env.TANGLE_API_KEY, forwardEnv: env })
|
|
46
|
-
* const mcp = { ...(delegation ? { [DELEGATION_MCP_SERVER_KEY]: delegation } : {}) }
|
|
47
|
-
*/
|
|
48
|
-
declare function buildDelegationMcpServer(opts: BuildDelegationOptions): DelegationMcpServer | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* Config-driven wiring: returns the delegation MCP entry keyed under
|
|
51
|
-
* {@link DELEGATION_MCP_SERVER_KEY} when the product's `config.delegation.enabled`
|
|
52
|
-
* is true (and a platform key is available), else an empty object. Spread the
|
|
53
|
-
* result directly into the sandbox profile's `mcp` map — this is the seam
|
|
54
|
-
* `agent.config.delegation` flows through, so a coding agent toggles background
|
|
55
|
-
* agents/loops by flipping one boolean, never by wiring the MCP by hand.
|
|
56
|
-
*
|
|
57
|
-
* const mcp = { ...rest, ...delegationMcpForConfig(config, { apiKey: env.TANGLE_API_KEY, forwardEnv: env }) }
|
|
58
|
-
*/
|
|
59
|
-
declare function delegationMcpForConfig(config: {
|
|
60
|
-
delegation?: {
|
|
61
|
-
enabled?: boolean;
|
|
62
|
-
};
|
|
63
|
-
}, opts: BuildDelegationOptions): Record<string, DelegationMcpServer>;
|
|
64
|
-
|
|
65
|
-
export { type BuildDelegationOptions, DELEGATION_MCP_SERVER_KEY, DELEGATION_TOOLS, type DelegationMcpServer, buildDelegationMcpServer, delegationMcpForConfig };
|
package/dist/delegation/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DELEGATION_MCP_SERVER_KEY,
|
|
3
|
-
DELEGATION_TOOLS,
|
|
4
|
-
buildDelegationMcpServer,
|
|
5
|
-
delegationMcpForConfig
|
|
6
|
-
} from "../chunk-AQ2BOPOQ.js";
|
|
7
|
-
export {
|
|
8
|
-
DELEGATION_MCP_SERVER_KEY,
|
|
9
|
-
DELEGATION_TOOLS,
|
|
10
|
-
buildDelegationMcpServer,
|
|
11
|
-
delegationMcpForConfig
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
File without changes
|