agentschat-mcp 0.36.24 → 0.36.25
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/CHANGELOG.md +5 -0
- package/README.md +8 -0
- package/dist/server.js +3479 -354
- package/package.json +3 -3
- package/skills/agentschat-team-lead/SKILL.md +1 -1
- package/skills/onboarding.md +5 -1
- package/src/argcheck.ts +1809 -0
- package/src/server.ts +2277 -324
- package/src/tool-annotations.ts +12 -0
- package/src/wake.ts +15 -0
package/src/tool-annotations.ts
CHANGED
|
@@ -37,6 +37,7 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
37
37
|
react: W,
|
|
38
38
|
thread_reply: W,
|
|
39
39
|
pin: W,
|
|
40
|
+
list_pins: R,
|
|
40
41
|
edit_message: W,
|
|
41
42
|
delete_message: D,
|
|
42
43
|
set_status: W,
|
|
@@ -56,6 +57,12 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
56
57
|
channel_brief: R,
|
|
57
58
|
my_entitlements: R,
|
|
58
59
|
list_loops: R,
|
|
60
|
+
create_loop: W,
|
|
61
|
+
pause_loop: W,
|
|
62
|
+
resume_loop: W,
|
|
63
|
+
set_loop_interval: W,
|
|
64
|
+
stop_loop: D,
|
|
65
|
+
cloud_agent_wake_health: R,
|
|
59
66
|
list_skills: R,
|
|
60
67
|
list_tool_groups: R,
|
|
61
68
|
|
|
@@ -69,6 +76,7 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
69
76
|
list_my_moderation_history: R,
|
|
70
77
|
|
|
71
78
|
// ── proposals / votes ──
|
|
79
|
+
list_proposals: R,
|
|
72
80
|
propose: W,
|
|
73
81
|
vote: W,
|
|
74
82
|
|
|
@@ -78,6 +86,7 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
78
86
|
sync_skill: R,
|
|
79
87
|
load_memory: R,
|
|
80
88
|
save_memory: W,
|
|
89
|
+
delete_memory: D,
|
|
81
90
|
load_tool_group: R,
|
|
82
91
|
invoke_extended_tool: W, // opaque dispatch — treat as write
|
|
83
92
|
|
|
@@ -91,12 +100,14 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
91
100
|
// ── OKR / DAG ──
|
|
92
101
|
okr_list: R,
|
|
93
102
|
okr_create_objective: W,
|
|
103
|
+
okr_update_objective: W,
|
|
94
104
|
okr_add_task: W,
|
|
95
105
|
okr_update_task: W,
|
|
96
106
|
okr_task_blockers: R,
|
|
97
107
|
okr_task_blocks: R,
|
|
98
108
|
okr_open_thread: W,
|
|
99
109
|
okr_add_kr: W,
|
|
110
|
+
okr_update_kr: W,
|
|
100
111
|
archive_objective: W,
|
|
101
112
|
unarchive_objective: W,
|
|
102
113
|
okr_reparent_objective: W,
|
|
@@ -111,6 +122,7 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotation> = {
|
|
|
111
122
|
list_channel_docs: R,
|
|
112
123
|
get_channel_doc: R,
|
|
113
124
|
upsert_channel_doc: W,
|
|
125
|
+
archive_channel_doc: W,
|
|
114
126
|
list_channel_doc_revisions: R,
|
|
115
127
|
};
|
|
116
128
|
|
package/src/wake.ts
CHANGED
|
@@ -27,6 +27,21 @@ import { redactSecrets } from "./redact.ts";
|
|
|
27
27
|
|
|
28
28
|
/** Signature header the receiver reads to verify a wake POST. */
|
|
29
29
|
export const WAKE_SIG_HEADER = "x-agentschat-signature";
|
|
30
|
+
/** Header forwarded on authenticated REST calls when AGENTSCHAT_WAKE_ID is present. */
|
|
31
|
+
export const WAKE_ID_HEADER = "X-AgentsChat-Wake-Id";
|
|
32
|
+
const SAFE_WAKE_ID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
33
|
+
const CREDENTIAL_PREFIX_RE = /^(ac_|sk-|sk_|ghp_|gho_|ghu_|ghs_|ghr_|github_pat_)/i;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Validate `AGENTSCHAT_WAKE_ID` injected by Cloud Sandbox per wake turn so
|
|
37
|
+
* stdio MCP REST calls (`okr_update_task`, `okr_add_task_comment`) carry
|
|
38
|
+
* explicit process-level wake correlation without ever echoing unsafe tokens.
|
|
39
|
+
*/
|
|
40
|
+
export function resolveEnvWakeId(env: Record<string, string | undefined> = process.env): string | undefined {
|
|
41
|
+
const raw = env.AGENTSCHAT_WAKE_ID?.trim();
|
|
42
|
+
if (!raw || !SAFE_WAKE_ID_RE.test(raw) || CREDENTIAL_PREFIX_RE.test(raw)) return undefined;
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
30
45
|
|
|
31
46
|
/** Cap the content excerpt for generic HTTP wake webhooks so a long message doesn't balloon the POST body. */
|
|
32
47
|
export const WAKE_CONTENT_MAX = 500;
|