@kodelyth/msteams 2026.5.42 → 2026.6.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/klaw.plugin.json +726 -2
- package/package.json +18 -6
- package/api.ts +0 -3
- package/channel-config-api.ts +0 -1
- package/channel-plugin-api.ts +0 -2
- package/config-api.ts +0 -4
- package/contract-api.ts +0 -4
- package/index.ts +0 -20
- package/runtime-api.ts +0 -66
- package/secret-contract-api.ts +0 -5
- package/setup-entry.ts +0 -13
- package/setup-plugin-api.ts +0 -3
- package/src/ai-entity.ts +0 -7
- package/src/approval-auth.ts +0 -44
- package/src/attachments/bot-framework.test.ts +0 -506
- package/src/attachments/bot-framework.ts +0 -348
- package/src/attachments/download.ts +0 -328
- package/src/attachments/graph.test.ts +0 -441
- package/src/attachments/graph.ts +0 -489
- package/src/attachments/html.ts +0 -122
- package/src/attachments/payload.ts +0 -14
- package/src/attachments/remote-media.test.ts +0 -187
- package/src/attachments/remote-media.ts +0 -86
- package/src/attachments/shared.test.ts +0 -547
- package/src/attachments/shared.ts +0 -655
- package/src/attachments/types.ts +0 -47
- package/src/attachments.graph.test.ts +0 -414
- package/src/attachments.helpers.test.ts +0 -245
- package/src/attachments.test-helpers.ts +0 -17
- package/src/attachments.test.ts +0 -754
- package/src/attachments.ts +0 -18
- package/src/block-streaming-config.test.ts +0 -61
- package/src/channel-api.ts +0 -1
- package/src/channel.actions.test.ts +0 -797
- package/src/channel.directory.test.ts +0 -176
- package/src/channel.message-adapter.test.ts +0 -227
- package/src/channel.runtime.ts +0 -56
- package/src/channel.setup.ts +0 -77
- package/src/channel.test.ts +0 -136
- package/src/channel.ts +0 -1176
- package/src/config-schema.ts +0 -6
- package/src/config-ui-hints.ts +0 -40
- package/src/conversation-store-fs.test.ts +0 -81
- package/src/conversation-store-fs.ts +0 -149
- package/src/conversation-store-helpers.test.ts +0 -202
- package/src/conversation-store-helpers.ts +0 -105
- package/src/conversation-store-memory.ts +0 -51
- package/src/conversation-store.shared.test.ts +0 -260
- package/src/conversation-store.ts +0 -71
- package/src/directory-live.test.ts +0 -156
- package/src/directory-live.ts +0 -111
- package/src/doctor.ts +0 -27
- package/src/errors.test.ts +0 -154
- package/src/errors.ts +0 -270
- package/src/feedback-reflection-prompt.ts +0 -117
- package/src/feedback-reflection-store.ts +0 -113
- package/src/feedback-reflection.test.ts +0 -237
- package/src/feedback-reflection.ts +0 -268
- package/src/file-consent-helpers.test.ts +0 -328
- package/src/file-consent-helpers.ts +0 -115
- package/src/file-consent-invoke.ts +0 -150
- package/src/file-consent.test.ts +0 -378
- package/src/file-consent.ts +0 -223
- package/src/graph-chat.ts +0 -36
- package/src/graph-group-management.test.ts +0 -332
- package/src/graph-group-management.ts +0 -168
- package/src/graph-members.test.ts +0 -89
- package/src/graph-members.ts +0 -48
- package/src/graph-messages.actions.test.ts +0 -253
- package/src/graph-messages.read.test.ts +0 -391
- package/src/graph-messages.search.test.ts +0 -227
- package/src/graph-messages.test-helpers.ts +0 -50
- package/src/graph-messages.ts +0 -534
- package/src/graph-teams.test.ts +0 -222
- package/src/graph-teams.ts +0 -114
- package/src/graph-thread.test.ts +0 -252
- package/src/graph-thread.ts +0 -146
- package/src/graph-upload.test.ts +0 -253
- package/src/graph-upload.ts +0 -531
- package/src/graph-users.ts +0 -29
- package/src/graph.test.ts +0 -540
- package/src/graph.ts +0 -308
- package/src/inbound.test.ts +0 -221
- package/src/inbound.ts +0 -148
- package/src/index.ts +0 -4
- package/src/media-helpers.test.ts +0 -220
- package/src/media-helpers.ts +0 -105
- package/src/mentions.test.ts +0 -254
- package/src/mentions.ts +0 -114
- package/src/messenger.test.ts +0 -961
- package/src/messenger.ts +0 -608
- package/src/monitor-handler/access.ts +0 -136
- package/src/monitor-handler/inbound-media.test.ts +0 -314
- package/src/monitor-handler/inbound-media.ts +0 -180
- package/src/monitor-handler/message-handler-mock-support.test-support.ts +0 -28
- package/src/monitor-handler/message-handler.authz.test.ts +0 -739
- package/src/monitor-handler/message-handler.dm-media.test.ts +0 -54
- package/src/monitor-handler/message-handler.test-support.ts +0 -99
- package/src/monitor-handler/message-handler.thread-parent.test.ts +0 -225
- package/src/monitor-handler/message-handler.thread-session.test.ts +0 -132
- package/src/monitor-handler/message-handler.ts +0 -1003
- package/src/monitor-handler/reaction-handler.test.ts +0 -325
- package/src/monitor-handler/reaction-handler.ts +0 -122
- package/src/monitor-handler/thread-session.ts +0 -30
- package/src/monitor-handler.adaptive-card.test.ts +0 -158
- package/src/monitor-handler.feedback-authz.test.ts +0 -357
- package/src/monitor-handler.file-consent.test.ts +0 -443
- package/src/monitor-handler.sso.test.ts +0 -576
- package/src/monitor-handler.test-helpers.ts +0 -181
- package/src/monitor-handler.ts +0 -538
- package/src/monitor-handler.types.ts +0 -27
- package/src/monitor-types.ts +0 -6
- package/src/monitor.lifecycle.test.ts +0 -457
- package/src/monitor.test.ts +0 -119
- package/src/monitor.ts +0 -476
- package/src/oauth.flow.ts +0 -77
- package/src/oauth.shared.ts +0 -37
- package/src/oauth.test.ts +0 -350
- package/src/oauth.token.ts +0 -162
- package/src/oauth.ts +0 -130
- package/src/outbound.test.ts +0 -400
- package/src/outbound.ts +0 -198
- package/src/pending-uploads-fs.test.ts +0 -261
- package/src/pending-uploads-fs.ts +0 -235
- package/src/pending-uploads.test.ts +0 -186
- package/src/pending-uploads.ts +0 -121
- package/src/policy.test.ts +0 -156
- package/src/policy.ts +0 -245
- package/src/polls-store-memory.ts +0 -32
- package/src/polls.test.ts +0 -169
- package/src/polls.ts +0 -312
- package/src/presentation.ts +0 -93
- package/src/probe.test.ts +0 -79
- package/src/probe.ts +0 -132
- package/src/reply-dispatcher.test.ts +0 -543
- package/src/reply-dispatcher.ts +0 -523
- package/src/reply-stream-controller.test.ts +0 -424
- package/src/reply-stream-controller.ts +0 -334
- package/src/resolve-allowlist.test.ts +0 -253
- package/src/resolve-allowlist.ts +0 -309
- package/src/revoked-context.ts +0 -17
- package/src/runtime.ts +0 -12
- package/src/sdk-types.ts +0 -59
- package/src/sdk.test.ts +0 -727
- package/src/sdk.ts +0 -916
- package/src/secret-contract.ts +0 -49
- package/src/secret-input.ts +0 -7
- package/src/send-context.test.ts +0 -93
- package/src/send-context.ts +0 -269
- package/src/send.test.ts +0 -588
- package/src/send.ts +0 -697
- package/src/sent-message-cache.test.ts +0 -106
- package/src/sent-message-cache.ts +0 -174
- package/src/session-route.ts +0 -40
- package/src/setup-core.ts +0 -162
- package/src/setup-surface.test.ts +0 -175
- package/src/setup-surface.ts +0 -319
- package/src/sso-token-store.test.ts +0 -74
- package/src/sso-token-store.ts +0 -166
- package/src/sso.ts +0 -300
- package/src/storage.ts +0 -25
- package/src/store-fs.ts +0 -42
- package/src/streaming-message.test.ts +0 -323
- package/src/streaming-message.ts +0 -327
- package/src/test-runtime.ts +0 -16
- package/src/thread-parent-context.test.ts +0 -224
- package/src/thread-parent-context.ts +0 -159
- package/src/token-response.ts +0 -11
- package/src/token.test.ts +0 -268
- package/src/token.ts +0 -194
- package/src/user-agent.test.ts +0 -121
- package/src/user-agent.ts +0 -53
- package/src/webhook-timeouts.ts +0 -27
- package/src/welcome-card.test.ts +0 -104
- package/src/welcome-card.ts +0 -57
- package/test-api.ts +0 -1
- package/tsconfig.json +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodelyth/msteams",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.6.2",
|
|
4
4
|
"description": "Klaw Microsoft Teams channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,16 +17,20 @@
|
|
|
17
17
|
"typebox": "1.1.38"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@kodelyth/plugin-sdk": "
|
|
20
|
+
"@kodelyth/plugin-sdk": "workspace:*",
|
|
21
21
|
"@types/jsonwebtoken": "9.0.10",
|
|
22
|
-
"@kodelyth/klaw": "
|
|
22
|
+
"@kodelyth/klaw": "workspace:*"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@kodelyth/klaw": ">=2026.5.19"
|
|
25
|
+
"@kodelyth/klaw": ">=2026.5.19",
|
|
26
|
+
"klaw": ">=2026.5.39"
|
|
26
27
|
},
|
|
27
28
|
"peerDependenciesMeta": {
|
|
28
29
|
"@kodelyth/klaw": {
|
|
29
30
|
"optional": true
|
|
31
|
+
},
|
|
32
|
+
"klaw": {
|
|
33
|
+
"optional": true
|
|
30
34
|
}
|
|
31
35
|
},
|
|
32
36
|
"klaw": {
|
|
@@ -66,6 +70,14 @@
|
|
|
66
70
|
"release": {
|
|
67
71
|
"publishToClawHub": true,
|
|
68
72
|
"publishToNpm": true
|
|
69
|
-
}
|
|
70
|
-
|
|
73
|
+
},
|
|
74
|
+
"runtimeExtensions": [
|
|
75
|
+
"./dist/index.js"
|
|
76
|
+
],
|
|
77
|
+
"runtimeSetupEntry": "./dist/setup-entry.js"
|
|
78
|
+
},
|
|
79
|
+
"files": [
|
|
80
|
+
"dist/**",
|
|
81
|
+
"klaw.plugin.json"
|
|
82
|
+
]
|
|
71
83
|
}
|
package/api.ts
DELETED
package/channel-config-api.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MSTeamsChannelConfigSchema } from "./src/config-schema.js";
|
package/channel-plugin-api.ts
DELETED
package/config-api.ts
DELETED
package/contract-api.ts
DELETED
package/index.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineBundledChannelEntry } from "klaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
3
|
-
export default defineBundledChannelEntry({
|
|
4
|
-
id: "msteams",
|
|
5
|
-
name: "Microsoft Teams",
|
|
6
|
-
description: "Microsoft Teams channel plugin (Bot Framework)",
|
|
7
|
-
importMetaUrl: import.meta.url,
|
|
8
|
-
plugin: {
|
|
9
|
-
specifier: "./channel-plugin-api.js",
|
|
10
|
-
exportName: "msteamsPlugin",
|
|
11
|
-
},
|
|
12
|
-
secrets: {
|
|
13
|
-
specifier: "./secret-contract-api.js",
|
|
14
|
-
exportName: "channelSecrets",
|
|
15
|
-
},
|
|
16
|
-
runtime: {
|
|
17
|
-
specifier: "./runtime-api.js",
|
|
18
|
-
exportName: "setMSTeamsRuntime",
|
|
19
|
-
},
|
|
20
|
-
});
|
package/runtime-api.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Private runtime barrel for the bundled Microsoft Teams extension.
|
|
2
|
-
// Keep this barrel thin and aligned with the local extension surface.
|
|
3
|
-
|
|
4
|
-
export { DEFAULT_ACCOUNT_ID } from "klaw/plugin-sdk/account-id";
|
|
5
|
-
export type { AllowlistMatch } from "klaw/plugin-sdk/allow-from";
|
|
6
|
-
export {
|
|
7
|
-
mergeAllowlist,
|
|
8
|
-
resolveAllowlistMatchSimple,
|
|
9
|
-
summarizeMapping,
|
|
10
|
-
} from "klaw/plugin-sdk/allow-from";
|
|
11
|
-
export type {
|
|
12
|
-
BaseProbeResult,
|
|
13
|
-
ChannelDirectoryEntry,
|
|
14
|
-
ChannelGroupContext,
|
|
15
|
-
ChannelMessageActionName,
|
|
16
|
-
ChannelOutboundAdapter,
|
|
17
|
-
} from "klaw/plugin-sdk/channel-contract";
|
|
18
|
-
export type { ChannelPlugin } from "klaw/plugin-sdk/channel-core";
|
|
19
|
-
export { logTypingFailure } from "klaw/plugin-sdk/channel-logging";
|
|
20
|
-
export { createChannelPairingController } from "klaw/plugin-sdk/channel-pairing";
|
|
21
|
-
export { resolveToolsBySender } from "klaw/plugin-sdk/channel-policy";
|
|
22
|
-
export { createChannelMessageReplyPipeline } from "klaw/plugin-sdk/channel-message";
|
|
23
|
-
export {
|
|
24
|
-
PAIRING_APPROVED_MESSAGE,
|
|
25
|
-
buildProbeChannelStatusSummary,
|
|
26
|
-
createDefaultChannelRuntimeState,
|
|
27
|
-
} from "klaw/plugin-sdk/channel-status";
|
|
28
|
-
export {
|
|
29
|
-
buildChannelKeyCandidates,
|
|
30
|
-
normalizeChannelSlug,
|
|
31
|
-
resolveChannelEntryMatchWithFallback,
|
|
32
|
-
resolveNestedAllowlistDecision,
|
|
33
|
-
} from "klaw/plugin-sdk/channel-targets";
|
|
34
|
-
export type {
|
|
35
|
-
GroupPolicy,
|
|
36
|
-
GroupToolPolicyConfig,
|
|
37
|
-
MSTeamsChannelConfig,
|
|
38
|
-
MSTeamsConfig,
|
|
39
|
-
MSTeamsReplyStyle,
|
|
40
|
-
MSTeamsTeamConfig,
|
|
41
|
-
MarkdownTableMode,
|
|
42
|
-
KlawConfig,
|
|
43
|
-
} from "klaw/plugin-sdk/config-contracts";
|
|
44
|
-
export { isDangerousNameMatchingEnabled } from "klaw/plugin-sdk/dangerous-name-runtime";
|
|
45
|
-
export { resolveDefaultGroupPolicy } from "klaw/plugin-sdk/runtime-group-policy";
|
|
46
|
-
export { withFileLock } from "klaw/plugin-sdk/file-lock";
|
|
47
|
-
export { keepHttpServerTaskAlive } from "klaw/plugin-sdk/channel-lifecycle";
|
|
48
|
-
export {
|
|
49
|
-
detectMime,
|
|
50
|
-
extensionForMime,
|
|
51
|
-
extractOriginalFilename,
|
|
52
|
-
getFileExtension,
|
|
53
|
-
resolveChannelMediaMaxBytes,
|
|
54
|
-
} from "klaw/plugin-sdk/media-runtime";
|
|
55
|
-
export { dispatchReplyFromConfigWithSettledDispatcher } from "klaw/plugin-sdk/inbound-reply-dispatch";
|
|
56
|
-
export { loadOutboundMediaFromUrl } from "klaw/plugin-sdk/outbound-media";
|
|
57
|
-
export { buildMediaPayload } from "klaw/plugin-sdk/reply-payload";
|
|
58
|
-
export type { ReplyPayload } from "klaw/plugin-sdk/reply-payload";
|
|
59
|
-
export type { PluginRuntime } from "klaw/plugin-sdk/runtime-store";
|
|
60
|
-
export type { RuntimeEnv } from "klaw/plugin-sdk/runtime";
|
|
61
|
-
export type { SsrFPolicy } from "klaw/plugin-sdk/ssrf-runtime";
|
|
62
|
-
export { fetchWithSsrFGuard } from "klaw/plugin-sdk/ssrf-runtime";
|
|
63
|
-
export { normalizeStringEntries } from "klaw/plugin-sdk/string-normalization-runtime";
|
|
64
|
-
export { chunkTextForOutbound } from "klaw/plugin-sdk/text-chunking";
|
|
65
|
-
export { DEFAULT_WEBHOOK_MAX_BODY_BYTES } from "klaw/plugin-sdk/webhook-ingress";
|
|
66
|
-
export { setMSTeamsRuntime } from "./src/runtime.js";
|
package/secret-contract-api.ts
DELETED
package/setup-entry.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineBundledChannelSetupEntry } from "klaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
3
|
-
export default defineBundledChannelSetupEntry({
|
|
4
|
-
importMetaUrl: import.meta.url,
|
|
5
|
-
plugin: {
|
|
6
|
-
specifier: "./setup-plugin-api.js",
|
|
7
|
-
exportName: "msteamsSetupPlugin",
|
|
8
|
-
},
|
|
9
|
-
secrets: {
|
|
10
|
-
specifier: "./secret-contract-api.js",
|
|
11
|
-
exportName: "channelSecrets",
|
|
12
|
-
},
|
|
13
|
-
});
|
package/setup-plugin-api.ts
DELETED
package/src/ai-entity.ts
DELETED
package/src/approval-auth.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createResolvedApproverActionAuthAdapter,
|
|
3
|
-
resolveApprovalApprovers,
|
|
4
|
-
} from "klaw/plugin-sdk/approval-auth-runtime";
|
|
5
|
-
import { normalizeOptionalLowercaseString } from "klaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
import type { KlawConfig } from "../runtime-api.js";
|
|
7
|
-
import { normalizeMSTeamsMessagingTarget } from "./resolve-allowlist.js";
|
|
8
|
-
|
|
9
|
-
const MSTEAMS_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10
|
-
|
|
11
|
-
function normalizeMSTeamsApproverId(value: string | number): string | undefined {
|
|
12
|
-
const normalized = normalizeMSTeamsMessagingTarget(String(value));
|
|
13
|
-
if (!normalized?.startsWith("user:")) {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
const id = normalizeOptionalLowercaseString(normalized.slice("user:".length));
|
|
17
|
-
if (!id) {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
return MSTEAMS_ID_RE.test(id) ? id : undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function resolveMSTeamsChannelConfig(cfg: KlawConfig) {
|
|
24
|
-
return cfg.channels?.msteams;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const msTeamsApprovalAuth = createResolvedApproverActionAuthAdapter({
|
|
28
|
-
channelLabel: "Microsoft Teams",
|
|
29
|
-
resolveApprovers: ({ cfg }) => {
|
|
30
|
-
const channel = resolveMSTeamsChannelConfig(cfg);
|
|
31
|
-
return resolveApprovalApprovers({
|
|
32
|
-
allowFrom: channel?.allowFrom,
|
|
33
|
-
defaultTo: channel?.defaultTo,
|
|
34
|
-
normalizeApprover: normalizeMSTeamsApproverId,
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
normalizeSenderId: (value) => {
|
|
38
|
-
const trimmed = normalizeOptionalLowercaseString(value);
|
|
39
|
-
if (!trimmed) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
return MSTEAMS_ID_RE.test(trimmed) ? trimmed : undefined;
|
|
43
|
-
},
|
|
44
|
-
});
|