@agentconnect.md/daemon 1.0.0-rc.303 → 1.0.0-rc.305
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/dist/{acp-host-DezWSmEG.js → acp-host-CbsRPfev.js} +2 -2
- package/dist/{acp-host-DezWSmEG.js.map → acp-host-CbsRPfev.js.map} +1 -1
- package/dist/{agent-list-Da9Osn4O.js → agent-list-Cs_EgUh5.js} +2 -2
- package/dist/{agent-list-Da9Osn4O.js.map → agent-list-Cs_EgUh5.js.map} +1 -1
- package/dist/{chat-D8QIIHor.js → chat-CTHBI7c2.js} +3 -3
- package/dist/{chat-D8QIIHor.js.map → chat-CTHBI7c2.js.map} +1 -1
- package/dist/{dist-Cq1Kimg_.js → dist-BG425zHm.js} +14 -4
- package/dist/dist-BG425zHm.js.map +1 -0
- package/dist/{gh-token-BfPlYQav.js → gh-token-VZeW2R2c.js} +3 -3
- package/dist/{gh-token-BfPlYQav.js.map → gh-token-VZeW2R2c.js.map} +1 -1
- package/dist/{git-credential-DhWn1IBJ.js → git-credential-BJUvnCyW.js} +2 -2
- package/dist/{git-credential-DhWn1IBJ.js.map → git-credential-BJUvnCyW.js.map} +1 -1
- package/dist/{gitcred-server-KXxLyYxc.js → gitcred-server-Bu-Svl7L.js} +29 -9
- package/dist/gitcred-server-Bu-Svl7L.js.map +1 -0
- package/dist/index.js +6 -6
- package/dist/{load-agents-gTqVkOwl.js → load-agents-CROyMyq9.js} +2 -2
- package/dist/{load-agents-gTqVkOwl.js.map → load-agents-CROyMyq9.js.map} +1 -1
- package/dist/{login-BqF1z9wE.js → login-yQ1p5vdm.js} +4 -4
- package/dist/{login-BqF1z9wE.js.map → login-yQ1p5vdm.js.map} +1 -1
- package/dist/run-foreground-BC8I28PP.js +2 -0
- package/dist/{run-foreground-syksXj_b.js → run-foreground-CIZ-iaBg.js} +50 -26
- package/dist/{run-foreground-syksXj_b.js.map → run-foreground-CIZ-iaBg.js.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-Cq1Kimg_.js.map +0 -1
- package/dist/gitcred-server-KXxLyYxc.js.map +0 -1
- package/dist/run-foreground-DEmppQGW.js +0 -2
|
@@ -3,11 +3,11 @@ import { n as require_ms, t as require_src$3 } from "./src-DDtlVutj.js";
|
|
|
3
3
|
import { n as init_esm_shims, t as __dirname } from "./esm-shims-DxGcm4Hw.js";
|
|
4
4
|
import { t as DAEMON_VERSION } from "./version-DGaRXjBK.js";
|
|
5
5
|
import { C as _coercedNumber, T as NEVER, a as array, d as literal, f as looseObject, i as any, m as object, o as boolean, p as number$1, t as ZodNumber, v as string, x as url$4 } from "./schemas-CQkO9hC5.js";
|
|
6
|
-
import { a as RELAY_DAEMON_WS_PATH, c as SHARED_CONFIG_ACTION_ID, d as encode, f as MAX_FRAME_BYTES, g as ZodIssueCode, h as RESERVED_MCP_SERVER_NAME, i as RELAY_DAEMON_SUBPROTOCOL, l as buildEnvelope, n as gitRepoLabel, o as buildRelayDaemonFrame, r as normalizeGitUrl, s as decodeRelayDaemonFrame, u as decodeEnvelope } from "./dist-
|
|
7
|
-
import { a as agentChildEnv, c as persistRelays, i as selectAgent, n as findAgentFiles, o as loadConfig, r as loadAgents, s as persistDaemonId } from "./load-agents-
|
|
6
|
+
import { a as RELAY_DAEMON_WS_PATH, c as SHARED_CONFIG_ACTION_ID, d as encode, f as MAX_FRAME_BYTES, g as ZodIssueCode, h as RESERVED_MCP_SERVER_NAME, i as RELAY_DAEMON_SUBPROTOCOL, l as buildEnvelope, n as gitRepoLabel, o as buildRelayDaemonFrame, r as normalizeGitUrl, s as decodeRelayDaemonFrame, u as decodeEnvelope } from "./dist-BG425zHm.js";
|
|
7
|
+
import { a as agentChildEnv, c as persistRelays, i as selectAgent, n as findAgentFiles, o as loadConfig, r as loadAgents, s as persistDaemonId } from "./load-agents-CROyMyq9.js";
|
|
8
8
|
import { l as resolveRoot, o as mcpSocketPath, u as statePath } from "./paths-DEcUO8lC.js";
|
|
9
|
-
import { S as resolveRuntimes, _ as writeMemoryFile, a as initGitInjection, b as cachedRuntimeNames, c as simpleGit, d as memoryProviderFor, f as MemoryConflictError, g as resolveInMemoryDir, h as listMemory, i as prepareWorkspace, l as createMemoryProvider, m as MemoryTooLargeError, n as installedRuntimes, o as probeGitVersion, p as MemoryPathError, r as prefetchWorkspace, s as sessionGitEnv, t as AcpHost, u as memoryKindOf, v as MEMORY_TOOL_NAMES, x as cachedRuntimeVersions, y as toolsForIntegrations } from "./acp-host-
|
|
10
|
-
import { i as GitCredentialCache, n as gitcredSocketPath, r as writeGitcredShim, t as GitCredServer } from "./gitcred-server-
|
|
9
|
+
import { S as resolveRuntimes, _ as writeMemoryFile, a as initGitInjection, b as cachedRuntimeNames, c as simpleGit, d as memoryProviderFor, f as MemoryConflictError, g as resolveInMemoryDir, h as listMemory, i as prepareWorkspace, l as createMemoryProvider, m as MemoryTooLargeError, n as installedRuntimes, o as probeGitVersion, p as MemoryPathError, r as prefetchWorkspace, s as sessionGitEnv, t as AcpHost, u as memoryKindOf, v as MEMORY_TOOL_NAMES, x as cachedRuntimeVersions, y as toolsForIntegrations } from "./acp-host-CbsRPfev.js";
|
|
10
|
+
import { i as GitCredentialCache, n as gitcredSocketPath, r as writeGitcredShim, t as GitCredServer } from "./gitcred-server-Bu-Svl7L.js";
|
|
11
11
|
import { B as ToolListChangedNotificationSchema, D as ListPromptsResultSchema, E as ListChangedOptionsBaseSchema, F as PromptListChangedNotificationSchema, G as isZ4Schema, H as isJSONRPCRequest, I as ReadResourceResultSchema, J as encodeFrame, K as safeParse, L as ResourceListChangedNotificationSchema, M as ListToolsResultSchema, O as ListResourceTemplatesResultSchema, P as McpError, R as SUPPORTED_PROTOCOL_VERSIONS, S as InitializeResultSchema, T as LATEST_PROTOCOL_VERSION, U as isJSONRPCResultResponse, V as isInitializedNotification, W as getObjectShape, _ as ElicitResultSchema, a as AjvJsonSchemaValidator, b as GetPromptResultSchema, c as mergeCapabilities, d as CompleteResultSchema, f as CreateMessageRequestSchema, g as ElicitRequestSchema, h as CreateTaskResultSchema, i as assertToolsCallTaskCapability, k as ListResourcesResultSchema, m as CreateMessageResultWithToolsSchema, n as serializeMessage, o as require_fast_deep_equal, p as CreateMessageResultSchema, q as decodeFrames, r as assertClientRequestTaskCapability, s as Protocol, t as ReadBuffer, u as CallToolResultSchema, v as EmptyResultSchema, w as JSONRPCMessageSchema, y as ErrorCode } from "./stdio-DnS8WcXi.js";
|
|
12
12
|
import { createRequire } from "node:module";
|
|
13
13
|
import { URL as URL$1 } from "url";
|
|
@@ -197689,27 +197689,36 @@ var GithubFinalPoster = class {
|
|
|
197689
197689
|
}
|
|
197690
197690
|
async post(text, deadlineAt) {
|
|
197691
197691
|
const body = this.render(text);
|
|
197692
|
-
const
|
|
197693
|
-
|
|
197694
|
-
|
|
197695
|
-
this.
|
|
197696
|
-
|
|
197692
|
+
const doFetch = this.deps.fetchImpl ?? fetch;
|
|
197693
|
+
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
197694
|
+
const token = await this.deps.token();
|
|
197695
|
+
if (this.abandoned) return;
|
|
197696
|
+
if (this.sched.now() >= deadlineAt) {
|
|
197697
|
+
this.abandonTimedOut();
|
|
197698
|
+
return;
|
|
197699
|
+
}
|
|
197700
|
+
const res = await doFetch(`${this.deps.baseUrl ?? "https://api.github.com"}/repos/${this.repo}/issues/${this.issueNumber}/comments`, {
|
|
197701
|
+
method: "POST",
|
|
197702
|
+
headers: {
|
|
197703
|
+
authorization: `Bearer ${token}`,
|
|
197704
|
+
accept: "application/vnd.github+json",
|
|
197705
|
+
"content-type": "application/json",
|
|
197706
|
+
"x-github-api-version": "2022-11-28"
|
|
197707
|
+
},
|
|
197708
|
+
signal: this.abort.signal,
|
|
197709
|
+
body: JSON.stringify({ body })
|
|
197710
|
+
});
|
|
197711
|
+
try {
|
|
197712
|
+
await res.body?.cancel();
|
|
197713
|
+
} catch {}
|
|
197714
|
+
if (res.ok) return;
|
|
197715
|
+
if (!(attempt === 0 && (res.status === 401 || res.status === 403) && this.deps.invalidateToken)) throw new Error(`GitHub POST ${res.status}`);
|
|
197716
|
+
try {
|
|
197717
|
+
this.deps.invalidateToken(token);
|
|
197718
|
+
} catch {
|
|
197719
|
+
throw new Error(`GitHub POST ${res.status}`);
|
|
197720
|
+
}
|
|
197697
197721
|
}
|
|
197698
|
-
const res = await (this.deps.fetchImpl ?? fetch)(`${this.deps.baseUrl ?? "https://api.github.com"}/repos/${this.repo}/issues/${this.issueNumber}/comments`, {
|
|
197699
|
-
method: "POST",
|
|
197700
|
-
headers: {
|
|
197701
|
-
authorization: `Bearer ${token}`,
|
|
197702
|
-
accept: "application/vnd.github+json",
|
|
197703
|
-
"content-type": "application/json",
|
|
197704
|
-
"x-github-api-version": "2022-11-28"
|
|
197705
|
-
},
|
|
197706
|
-
signal: this.abort.signal,
|
|
197707
|
-
body: JSON.stringify({ body })
|
|
197708
|
-
});
|
|
197709
|
-
try {
|
|
197710
|
-
await res.body?.cancel();
|
|
197711
|
-
} catch {}
|
|
197712
|
-
if (!res.ok) throw new Error(`GitHub POST ${res.status}`);
|
|
197713
197722
|
}
|
|
197714
197723
|
render(text) {
|
|
197715
197724
|
if (text.length + this.footer.length <= MAX_COMMENT_CHARS) {
|
|
@@ -216696,6 +216705,7 @@ var Daemon = class Daemon {
|
|
|
216696
216705
|
}
|
|
216697
216706
|
}
|
|
216698
216707
|
const githubReply = c?.source === "github" && c.repo && c.number !== void 0 ? {
|
|
216708
|
+
hookId: msg.hookId,
|
|
216699
216709
|
repo: c.repo,
|
|
216700
216710
|
number: c.number
|
|
216701
216711
|
} : void 0;
|
|
@@ -217912,6 +217922,19 @@ var Daemon = class Daemon {
|
|
|
217912
217922
|
if (row?.channelName !== void 0) event.channelName = row.channelName;
|
|
217913
217923
|
if (row?.triggeredByName !== void 0) event.triggeredByName = row.triggeredByName;
|
|
217914
217924
|
if (row?.threadUrl !== void 0) event.threadUrl = row.threadUrl;
|
|
217925
|
+
const agent = this.agents.get(input.agentId);
|
|
217926
|
+
if (agent?.runtime) event.runtime = agent.runtime;
|
|
217927
|
+
const storeKey = this.store.getSessionByAcpId(input.sessionId)?.key;
|
|
217928
|
+
const model = (storeKey ? this.store.getModelOverride(storeKey) : void 0) ?? agent?.runtimeOverrides?.model;
|
|
217929
|
+
if (model !== void 0) event.model = model;
|
|
217930
|
+
const effort = (storeKey ? this.store.getEffortOverride(storeKey) : void 0) ?? agent?.reasoningEffort;
|
|
217931
|
+
if (effort !== void 0) event.effort = effort;
|
|
217932
|
+
const fastMode = (storeKey ? this.store.getFastModeOverride(storeKey) : void 0) ?? agent?.fastMode;
|
|
217933
|
+
if (fastMode !== void 0) event.fastMode = fastMode;
|
|
217934
|
+
const permissionMode = (storeKey ? this.store.getPermissionModeOverride(storeKey) : void 0) ?? agent?.permissionMode;
|
|
217935
|
+
if (permissionMode !== void 0) event.permissionMode = permissionMode;
|
|
217936
|
+
const outputMode = (storeKey ? this.store.getOutputModeOverride(storeKey) : void 0) ?? agent?.output?.mode;
|
|
217937
|
+
if (outputMode !== void 0) event.outputMode = outputMode;
|
|
217915
217938
|
try {
|
|
217916
217939
|
this.cpClient.emitEventSession(event);
|
|
217917
217940
|
} catch (err) {
|
|
@@ -218916,7 +218939,8 @@ var Daemon = class Daemon {
|
|
|
218916
218939
|
return {
|
|
218917
218940
|
collector: new GithubReplyCollector(),
|
|
218918
218941
|
poster: new GithubFinalPoster({
|
|
218919
|
-
token: async () => (await this.gitCreds.getPostToken(agentId, ref.repo)).token,
|
|
218942
|
+
token: async () => (await this.gitCreds.getPostToken(agentId, ref.repo, ref.hookId)).token,
|
|
218943
|
+
invalidateToken: (token) => this.gitCreds.invalidatePost(agentId, ref.repo, token),
|
|
218920
218944
|
log: { warn: (m) => this.log.warn(m) }
|
|
218921
218945
|
}, ref.repo, ref.number, {
|
|
218922
218946
|
agentName: agent?.name ?? agentId,
|
|
@@ -219211,4 +219235,4 @@ async function runForeground(opts, deps = {}) {
|
|
|
219211
219235
|
//#endregion
|
|
219212
219236
|
export { ClientTransport as i, CP_SUBPROTOCOL as n, CP_WS_PATH as r, runForeground as t };
|
|
219213
219237
|
|
|
219214
|
-
//# sourceMappingURL=run-foreground-
|
|
219238
|
+
//# sourceMappingURL=run-foreground-CIZ-iaBg.js.map
|