@sleep2agi/agent-network 2.3.0-preview.4 → 2.3.0-preview.41
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 +35 -324
- package/dist/bin/anet.cjs +101 -0
- package/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +20 -1
- package/dist/bin/goal-wake-log-render.d.ts +31 -0
- package/dist/src/batch-workdir.d.ts +9 -0
- package/dist/src/bootstrap-password-db.d.ts +13 -0
- package/dist/src/channel-attachments.d.ts +29 -0
- package/dist/src/channel-task-trace.d.ts +10 -0
- package/dist/src/claude-vendor-env.d.ts +28 -0
- package/dist/src/cli-args.d.ts +8 -0
- package/dist/src/client-task-trace.d.ts +9 -0
- package/dist/src/client.js +1 -1
- package/dist/src/codex-copresence-preflight.d.ts +65 -0
- package/dist/src/codex-copresence-profile.d.ts +68 -0
- package/dist/src/codex-model-default.d.ts +6 -0
- package/dist/src/controlled-upload.d.ts +83 -0
- package/dist/src/copresence-deps.d.ts +20 -0
- package/dist/src/copresence-identity.d.ts +339 -0
- package/dist/src/dashboard-managed-process.d.ts +35 -0
- package/dist/src/environ-alias.d.ts +14 -0
- package/dist/src/grok-attach-client.d.ts +115 -0
- package/dist/src/grok-copresence-disclosure.d.ts +11 -0
- package/dist/src/grok-copresence-profile.d.ts +65 -0
- package/dist/src/im/feishu/adapter.d.ts +149 -1
- package/dist/src/im/feishu/bridge.d.ts +9 -0
- package/dist/src/im/feishu/config.d.ts +31 -0
- package/dist/src/im/feishu/hub-upload.d.ts +88 -0
- package/dist/src/im/feishu/markdown-image-renderer.d.ts +61 -0
- package/dist/src/im/feishu/outbound-marker.d.ts +140 -0
- package/dist/src/im/feishu/outbound-paths.d.ts +50 -0
- package/dist/src/im/feishu/outbound-route.d.ts +62 -0
- package/dist/src/im/feishu/worker-lifecycle.d.ts +13 -0
- package/dist/src/im/feishu/worker.js +391 -16
- package/dist/src/im/types.d.ts +38 -1
- package/dist/src/locale-diagnostic.d.ts +12 -0
- package/dist/src/mock-llm.d.ts +12 -0
- package/dist/src/node-server.js +7 -1
- package/dist/src/normalize-runtime.d.ts +14 -2
- package/dist/src/opencode-agent-node-pair.d.ts +14 -0
- package/dist/src/opencode-auth-login.d.ts +43 -0
- package/dist/src/opencode-launch-env.d.ts +13 -0
- package/dist/src/opencode-owner-mode.d.ts +6 -0
- package/dist/src/opencode-package-binary.d.ts +21 -0
- package/dist/src/opencode-pin.d.ts +44 -0
- package/dist/src/opencode-preset.d.ts +73 -0
- package/dist/src/opencode-runtime-binding.d.ts +30 -0
- package/dist/src/opencode-safe-root.d.ts +27 -0
- package/dist/src/opencode-smoke-env.d.ts +1 -0
- package/dist/src/outbound-tool-names.d.ts +1 -0
- package/dist/src/owner-env-file.d.ts +2 -0
- package/dist/src/package-mode-preflight.d.ts +31 -0
- package/dist/src/primary-network.d.ts +23 -0
- package/dist/src/private-state.d.ts +10 -0
- package/dist/src/project-key.d.ts +1 -0
- package/dist/src/secret-shell-guidance.d.ts +3 -0
- package/dist/src/task-trace.d.ts +33 -0
- package/dist/src/tmux-attach.d.ts +8 -0
- package/dist/src/tmux-capability.d.ts +58 -0
- package/dist/src/tmux-exact-target.d.ts +34 -0
- package/dist/src/tmux-pane-prompt.d.ts +22 -0
- package/dist/src/token-cli.d.ts +13 -0
- package/dist/src/unsafe-package-path-reason.d.ts +17 -0
- package/package.json +10 -6
package/dist/src/im/types.d.ts
CHANGED
|
@@ -72,13 +72,42 @@ export interface NormalizedIMEvent {
|
|
|
72
72
|
mentioned: boolean;
|
|
73
73
|
content: {
|
|
74
74
|
text?: string;
|
|
75
|
-
/** Local filesystem paths to already-downloaded images.
|
|
75
|
+
/** Local filesystem paths to already-downloaded images.
|
|
76
|
+
*
|
|
77
|
+
* RFC-020 §17 backward-compat shim: the new richer
|
|
78
|
+
* `attachments[]` field below is the canonical source going
|
|
79
|
+
* forward. `images` stays a `string[]` of paths so an older
|
|
80
|
+
* agent-node worker reading this envelope across a rolling
|
|
81
|
+
* upgrade doesn't crash. New workers prefer `attachments`,
|
|
82
|
+
* old workers ignore it and keep using `images`. */
|
|
76
83
|
images?: string[];
|
|
77
84
|
files?: {
|
|
78
85
|
name: string;
|
|
79
86
|
path?: string;
|
|
80
87
|
url?: string;
|
|
81
88
|
}[];
|
|
89
|
+
/** RFC-020 §17 cross-machine attachment descriptors.
|
|
90
|
+
*
|
|
91
|
+
* Each entry mirrors `meta.attachments[]` on commhub tasks
|
|
92
|
+
* (`{ type, file_id?, path?, mime?, name?, size? }`). The
|
|
93
|
+
* feishu bridge populates `file_id` by uploading inbound
|
|
94
|
+
* files to `/api/upload` so cross-host agents delegated via
|
|
95
|
+
* `commhub_send_task(meta.attachments=...)` can fetch via
|
|
96
|
+
* `/api/files/<id>`. When upload fails, `file_id` is absent
|
|
97
|
+
* and the descriptor degrades to path-only (single-host
|
|
98
|
+
* still works via local Read; no regression vs pre-fix
|
|
99
|
+
* baseline).
|
|
100
|
+
*
|
|
101
|
+
* Always populated alongside `images` for the same files —
|
|
102
|
+
* duplication is intentional for rolling-upgrade safety. */
|
|
103
|
+
attachments?: Array<{
|
|
104
|
+
type: "image" | "file";
|
|
105
|
+
path?: string;
|
|
106
|
+
file_id?: string;
|
|
107
|
+
mime?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
size?: number;
|
|
110
|
+
}>;
|
|
82
111
|
};
|
|
83
112
|
/**
|
|
84
113
|
* Original platform payload. Default: held in memory only and dropped after
|
|
@@ -115,6 +144,14 @@ export interface NormalizedIMMessage {
|
|
|
115
144
|
replyToMessageId?: string;
|
|
116
145
|
/** Ephemeral / visible-to-sender-only. Slack only; others ignore. */
|
|
117
146
|
ephemeral?: boolean;
|
|
147
|
+
/** Caption-mode hint (RFC-020 §15.2): bypass markdown-card / markdown→PNG
|
|
148
|
+
* rendering and send as plain text. Set by the bridge when the same
|
|
149
|
+
* dispatch loop is also sending one or more attachment files — the text
|
|
150
|
+
* is a caption ("here's the report"), not the deliverable. Without this
|
|
151
|
+
* hint, Vincent's "make me a PDF" UAT had the bot's accompanying
|
|
152
|
+
* description heading + bullet list rendered to PNG via #329, which
|
|
153
|
+
* read as "you sent another image" instead of "you sent my file". */
|
|
154
|
+
forceTextOnly?: boolean;
|
|
118
155
|
/** Tie back to the commhub task that produced this message. */
|
|
119
156
|
correlation: {
|
|
120
157
|
taskId: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface LocaleDiagnostic {
|
|
2
|
+
effectiveVariable: "LC_ALL" | "LC_CTYPE" | "LANG" | null;
|
|
3
|
+
effectiveValue: string | null;
|
|
4
|
+
shouldWarn: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolve the locale with the same precedence used by POSIX libc. Windows
|
|
8
|
+
* does not use these variables as its process Unicode boundary, so prescribing
|
|
9
|
+
* a POSIX locale there would be misleading.
|
|
10
|
+
*/
|
|
11
|
+
export declare function diagnoseLocale(env: Readonly<Record<string, string | undefined>>, platform: string): LocaleDiagnostic;
|
|
12
|
+
export declare function formatLocaleSource(diagnostic: LocaleDiagnostic): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const MOCK_LLM_FALLBACK = "(mock LLM: no rule matched)";
|
|
2
|
+
export type MockLlmRule = Readonly<{
|
|
3
|
+
in_substring: string;
|
|
4
|
+
out: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type MockLlmResolution = Readonly<{
|
|
7
|
+
reply: string;
|
|
8
|
+
matched: boolean;
|
|
9
|
+
ruleIndex: number | null;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function loadMockLlmRules(path: string): readonly MockLlmRule[];
|
|
12
|
+
export declare function resolveMockLlmReply(rules: readonly MockLlmRule[], prompt: string, warn?: (message: string) => void): MockLlmResolution;
|