@integrity-labs/agt-cli 0.26.1 → 0.26.2-eng5706.0
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/bin/agt.js +4 -4
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-QJJAGFJJ.js → chunk-QSDDP7JN.js} +17 -106
- package/dist/chunk-QSDDP7JN.js.map +1 -0
- package/dist/{chunk-7NDNTSHD.js → chunk-U3HCB23E.js} +154 -3
- package/dist/chunk-U3HCB23E.js.map +1 -0
- package/dist/{chunk-UTPOHAX7.js → chunk-WERKUMWY.js} +97 -5
- package/dist/chunk-WERKUMWY.js.map +1 -0
- package/dist/chunk-XWVM4KPK.js +96 -0
- package/dist/chunk-XWVM4KPK.js.map +1 -0
- package/dist/claude-code-updater-7BGQ6JCV.js +101 -0
- package/dist/claude-code-updater-7BGQ6JCV.js.map +1 -0
- package/dist/{claude-pair-runtime-A35NZYDN.js → claude-pair-runtime-2NNAUBP3.js} +2 -2
- package/dist/lib/manager-worker.js +174 -137
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/index.js +5 -3
- package/dist/{persistent-session-E5EZ32CI.js → persistent-session-K4X76LLB.js} +4 -3
- package/dist/{responsiveness-probe-MLUVAXJH.js → responsiveness-probe-QBV43SJ7.js} +4 -3
- package/dist/{responsiveness-probe-MLUVAXJH.js.map → responsiveness-probe-QBV43SJ7.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-7NDNTSHD.js.map +0 -1
- package/dist/chunk-QJJAGFJJ.js.map +0 -1
- package/dist/chunk-UTPOHAX7.js.map +0 -1
- /package/dist/{claude-pair-runtime-A35NZYDN.js.map → claude-pair-runtime-2NNAUBP3.js.map} +0 -0
- /package/dist/{persistent-session-E5EZ32CI.js.map → persistent-session-K4X76LLB.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseDeliveryTarget,
|
|
10
10
|
registerFramework,
|
|
11
11
|
wrapScheduledTaskPrompt
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-U3HCB23E.js";
|
|
13
13
|
|
|
14
14
|
// ../../packages/core/dist/integrations/registry.js
|
|
15
15
|
var INTEGRATION_REGISTRY = [
|
|
@@ -3783,6 +3783,7 @@ function provisionStopHook(codeName) {
|
|
|
3783
3783
|
'AGENT_DIR="$(dirname "$CWD")"',
|
|
3784
3784
|
'TG_MARKER_DIR="${AGENT_DIR}/telegram-pending-inbound"',
|
|
3785
3785
|
'SL_MARKER_DIR="${AGENT_DIR}/slack-pending-inbound"',
|
|
3786
|
+
'MS_MARKER_DIR="${AGENT_DIR}/msteams-pending-inbound/.markers"',
|
|
3786
3787
|
"# CodeRabbit ENG-4569 round-3: latest-marker correlation could leak chat",
|
|
3787
3788
|
"# A's composed reply into chat B if B arrived later. Now correlate by",
|
|
3788
3789
|
"# scanning the transcript for the LAST channel-source <channel ...> tag",
|
|
@@ -3798,7 +3799,8 @@ function provisionStopHook(codeName) {
|
|
|
3798
3799
|
"}",
|
|
3799
3800
|
'TG_PENDING=$(pending_markers_count "$TG_MARKER_DIR")',
|
|
3800
3801
|
'SL_PENDING=$(pending_markers_count "$SL_MARKER_DIR")',
|
|
3801
|
-
'
|
|
3802
|
+
'MS_PENDING=$(pending_markers_count "$MS_MARKER_DIR")',
|
|
3803
|
+
'if [ "$TG_PENDING" = "0" ] && [ "$SL_PENDING" = "0" ] && [ "$MS_PENDING" = "0" ]; then exit 0; fi',
|
|
3802
3804
|
`LAST_ASSISTANT=$(tail -200 "$TRANSCRIPT_PATH" | jq -cs '[.[] | select(.type == "assistant" or .role == "assistant")] | last // empty' 2>/dev/null || true)`,
|
|
3803
3805
|
'if [ -z "$LAST_ASSISTANT" ] || [ "$LAST_ASSISTANT" = "null" ]; then exit 0; fi',
|
|
3804
3806
|
`TEXT=$(echo "$LAST_ASSISTANT" | jq -r '(.message.content // .content // []) | map(select(.type == "text") | .text) | join("\\n\\n")' 2>/dev/null || true)`,
|
|
@@ -3867,6 +3869,32 @@ function provisionStopHook(codeName) {
|
|
|
3867
3869
|
' --arg c "$channel" --arg th "$thread_ts" --arg t "$TEXT"',
|
|
3868
3870
|
' rm -f "$marker_path" 2>/dev/null || true',
|
|
3869
3871
|
"}",
|
|
3872
|
+
"recover_teams_for() {",
|
|
3873
|
+
' local conversation_id="$1" reply_to_id="$2" service_url="$3"',
|
|
3874
|
+
' if [ -z "$conversation_id" ] || [ -z "$service_url" ]; then return; fi',
|
|
3875
|
+
" # If the agent DID call teams.reply this turn, no recovery needed.",
|
|
3876
|
+
` if echo "$TOOL_NAMES" | grep -qE '^teams\\.reply$'; then return; fi`,
|
|
3877
|
+
" # teams-channel.ts encodes the marker filename as",
|
|
3878
|
+
" # hex(conversation_id)[..64]--hex(activity_id)[..64].json",
|
|
3879
|
+
" # We don't have the original activity_id here, only the",
|
|
3880
|
+
" # reply_to_id from the channel tag (which IS the original",
|
|
3881
|
+
" # activity_id the agent saw). Try a prefix match against the",
|
|
3882
|
+
" # marker dir.",
|
|
3883
|
+
" local hex_conv",
|
|
3884
|
+
' hex_conv=$(printf %s "$conversation_id" | od -An -tx1 | tr -d " \\n" | cut -c1-64)',
|
|
3885
|
+
' local marker_path=""',
|
|
3886
|
+
" shopt -s nullglob",
|
|
3887
|
+
' for f in "$MS_MARKER_DIR"/${hex_conv}*.json; do',
|
|
3888
|
+
' if [ -z "$marker_path" ]; then marker_path="$f"; fi',
|
|
3889
|
+
" done",
|
|
3890
|
+
' if [ -z "$marker_path" ]; then return; fi',
|
|
3891
|
+
" local TS",
|
|
3892
|
+
" TS=$(date -u +%Y%m%dT%H%M%S%N)",
|
|
3893
|
+
' atomic_write_payload "${AGENT_DIR}/msteams-recovery-outbox" "${TS}.json" \\',
|
|
3894
|
+
` '{conversation_id:$c, reply_to_id:$r, service_url:$s, text:$t, source:"ghost-reply-recovery"}' \\`,
|
|
3895
|
+
' --arg c "$conversation_id" --arg r "$reply_to_id" --arg s "$service_url" --arg t "$TEXT"',
|
|
3896
|
+
' rm -f "$marker_path" 2>/dev/null || true',
|
|
3897
|
+
"}",
|
|
3870
3898
|
"# Strict correlation: only recover if the last channel tag in the",
|
|
3871
3899
|
"# transcript points at a channel/key that has an exact-match pending",
|
|
3872
3900
|
"# marker. No tag found \u2192 skip; let timeout handle it.",
|
|
@@ -3878,6 +3906,11 @@ function provisionStopHook(codeName) {
|
|
|
3878
3906
|
' CHANNEL=$(extract_attr "$CHANNEL_TAG" "channel")',
|
|
3879
3907
|
' THREAD_TS=$(extract_attr "$CHANNEL_TAG" "thread_ts")',
|
|
3880
3908
|
' recover_slack_for "$CHANNEL" "$THREAD_TS"',
|
|
3909
|
+
'elif [ "$TAG_SOURCE" = "msteams" ]; then',
|
|
3910
|
+
' CONVERSATION_ID=$(extract_attr "$CHANNEL_TAG" "conversation_id")',
|
|
3911
|
+
' REPLY_TO_ID=$(extract_attr "$CHANNEL_TAG" "reply_to_id")',
|
|
3912
|
+
' SERVICE_URL=$(extract_attr "$CHANNEL_TAG" "service_url")',
|
|
3913
|
+
' recover_teams_for "$CONVERSATION_ID" "$REPLY_TO_ID" "$SERVICE_URL"',
|
|
3881
3914
|
"fi",
|
|
3882
3915
|
"exit 0"
|
|
3883
3916
|
].join("\n") + "\n";
|
|
@@ -4015,7 +4048,7 @@ function provisionOrientHook(codeName) {
|
|
|
4015
4048
|
"echo",
|
|
4016
4049
|
'echo "## Pending inbound"',
|
|
4017
4050
|
"pending_total=0",
|
|
4018
|
-
"for channel in slack telegram direct-chat; do",
|
|
4051
|
+
"for channel in slack telegram direct-chat msteams; do",
|
|
4019
4052
|
' dir="${AGENT_DIR}/${channel}-pending-inbound"',
|
|
4020
4053
|
' if [ -d "$dir" ]; then',
|
|
4021
4054
|
' count=$(find "$dir" -maxdepth 1 -type f 2>/dev/null | wc -l | tr -d " ")',
|
|
@@ -4237,7 +4270,7 @@ The parent passes you in the task description:
|
|
|
4237
4270
|
Your job:
|
|
4238
4271
|
|
|
4239
4272
|
1. Do the work the message asks for (Xero pull, research, multi-step skill, etc.). Use whichever tools you need.
|
|
4240
|
-
2. Post the reply yourself via the matching channel tool \u2014 slack.reply for Slack, telegram.reply for Telegram, directchat.reply for Direct Chat. Use the metadata the parent gave you to address the right thread/conversation.
|
|
4273
|
+
2. Post the reply yourself via the matching channel tool \u2014 slack.reply for Slack, telegram.reply for Telegram, teams.reply for Microsoft Teams, directchat.reply for Direct Chat. Use the metadata the parent gave you to address the right thread/conversation.
|
|
4241
4274
|
3. End. Do not do additional follow-up work; if more is needed, the user will send another message.
|
|
4242
4275
|
|
|
4243
4276
|
Do NOT post intermediate progress updates unless the work spans 5+ minutes \u2014 keep noise low. The parent already sent a single-line acknowledgement before dispatching you.
|
|
@@ -4917,6 +4950,65 @@ ${sections}`
|
|
|
4917
4950
|
}
|
|
4918
4951
|
};
|
|
4919
4952
|
}
|
|
4953
|
+
} else if (channelId === "msteams") {
|
|
4954
|
+
const appId = config["app_id"];
|
|
4955
|
+
const clientSecret = config["client_secret"];
|
|
4956
|
+
if (!appId || !clientSecret)
|
|
4957
|
+
return;
|
|
4958
|
+
const localTeamsChannel = join4(getHomeDir3(), ".augmented", "_mcp", "teams-channel.js");
|
|
4959
|
+
const homeDirMs = getHomeDir3();
|
|
4960
|
+
try {
|
|
4961
|
+
mkdirSync4(join4(homeDirMs, ".augmented", codeName, "msteams-pending-inbound", ".markers"), { recursive: true });
|
|
4962
|
+
mkdirSync4(join4(homeDirMs, ".augmented", codeName, "msteams-pending-interactions"), { recursive: true });
|
|
4963
|
+
mkdirSync4(join4(homeDirMs, ".augmented", codeName, "msteams-recovery-outbox"), { recursive: true });
|
|
4964
|
+
} catch {
|
|
4965
|
+
}
|
|
4966
|
+
const tenantId = config["tenant_id"] ?? "common";
|
|
4967
|
+
const botObjectId = config["bot_object_id"];
|
|
4968
|
+
const allowedTeamIds = config["allowed_team_ids"] ?? [];
|
|
4969
|
+
const threadAutoFollow = config["thread_auto_follow"] ?? "off";
|
|
4970
|
+
const channelResponseMode = config["channel_response_mode"] ?? "mention_only";
|
|
4971
|
+
const adaptiveCardsEnabled = config["adaptive_cards_enabled"] === true;
|
|
4972
|
+
const adaptiveCardsAskUserEnabled = config["adaptive_cards_ask_user_enabled"] === true;
|
|
4973
|
+
const peerAgentMode = config["peer_agent_mode"] ?? "off";
|
|
4974
|
+
const peerTeamIds = config["peer_team_ids"] ?? [];
|
|
4975
|
+
const knownPeerBotIds = config["known_peer_bot_ids"] ?? [];
|
|
4976
|
+
const msResolvedAgtApiKey = process.env["AGT_API_KEY"]?.trim();
|
|
4977
|
+
const msteamsAgtAuthEnv = {
|
|
4978
|
+
AGT_HOST: process.env["AGT_HOST"]?.trim() || "https://api.augmented.team",
|
|
4979
|
+
AGT_AGENT_CODE_NAME: codeName,
|
|
4980
|
+
...msResolvedAgtApiKey ? { AGT_API_KEY: msResolvedAgtApiKey } : {},
|
|
4981
|
+
...options?.agentId ? { AGT_AGENT_ID: options.agentId } : {}
|
|
4982
|
+
};
|
|
4983
|
+
const teamsEnv = {
|
|
4984
|
+
MSTEAMS_APP_ID: appId,
|
|
4985
|
+
MSTEAMS_CLIENT_SECRET: clientSecret,
|
|
4986
|
+
MSTEAMS_TENANT_ID: tenantId,
|
|
4987
|
+
...botObjectId ? { MSTEAMS_BOT_OBJECT_ID: botObjectId } : {},
|
|
4988
|
+
...allowedTeamIds.length > 0 ? { MSTEAMS_ALLOWED_TEAMS: allowedTeamIds.join(",") } : {},
|
|
4989
|
+
...threadAutoFollow !== "off" ? { MSTEAMS_THREAD_AUTO_FOLLOW: threadAutoFollow } : {},
|
|
4990
|
+
...channelResponseMode !== "mention_only" ? { MSTEAMS_CHANNEL_RESPONSE_MODE: channelResponseMode } : {},
|
|
4991
|
+
...adaptiveCardsEnabled ? { MSTEAMS_ADAPTIVE_CARDS_ENABLED: "true" } : {},
|
|
4992
|
+
...adaptiveCardsEnabled && adaptiveCardsAskUserEnabled ? { MSTEAMS_ADAPTIVE_CARDS_ASK_USER_ENABLED: "true" } : {},
|
|
4993
|
+
...peerAgentMode !== "off" ? { MSTEAMS_PEER_AGENT_MODE: peerAgentMode } : {},
|
|
4994
|
+
...peerTeamIds.length > 0 ? { MSTEAMS_PEER_TEAM_IDS: peerTeamIds.join(",") } : {},
|
|
4995
|
+
...knownPeerBotIds.length > 0 ? { MSTEAMS_KNOWN_PEER_BOT_IDS: knownPeerBotIds.join(",") } : {},
|
|
4996
|
+
...msteamsAgtAuthEnv,
|
|
4997
|
+
...tzEnv
|
|
4998
|
+
};
|
|
4999
|
+
if (isPersistent && existsSync5(localTeamsChannel)) {
|
|
5000
|
+
mcpServers["msteams"] = {
|
|
5001
|
+
command: "node",
|
|
5002
|
+
args: [localTeamsChannel],
|
|
5003
|
+
env: teamsEnv
|
|
5004
|
+
};
|
|
5005
|
+
} else {
|
|
5006
|
+
mcpServers["msteams"] = {
|
|
5007
|
+
command: "node",
|
|
5008
|
+
args: [localTeamsChannel],
|
|
5009
|
+
env: teamsEnv
|
|
5010
|
+
};
|
|
5011
|
+
}
|
|
4920
5012
|
}
|
|
4921
5013
|
if (writeMcpJsonGuarded(codeName, mcpJsonPath, mcpConfig)) {
|
|
4922
5014
|
syncMcpToProject(codeName);
|
|
@@ -6588,4 +6680,4 @@ export {
|
|
|
6588
6680
|
managerInstallSystemUnitCommand,
|
|
6589
6681
|
managerUninstallSystemUnitCommand
|
|
6590
6682
|
};
|
|
6591
|
-
//# sourceMappingURL=chunk-
|
|
6683
|
+
//# sourceMappingURL=chunk-WERKUMWY.js.map
|