weacpx 0.4.10 → 0.5.1

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.
@@ -57,6 +57,10 @@ export interface OrchestrationConfig {
57
57
  progressHeartbeatSeconds: number;
58
58
  maxParallelTasksPerAgent: number;
59
59
  }
60
+ export type LaterDefaultMode = "temp" | "bind";
61
+ export interface LaterConfig {
62
+ defaultMode: LaterDefaultMode;
63
+ }
60
64
  export interface ChannelRuntimeConfig {
61
65
  id: string;
62
66
  type: string;
@@ -77,4 +81,5 @@ export interface AppConfig {
77
81
  agents: Record<string, AgentConfig>;
78
82
  workspaces: Record<string, WorkspaceConfig>;
79
83
  orchestration: OrchestrationConfig;
84
+ later?: LaterConfig;
80
85
  }
@@ -128,8 +128,15 @@ export interface OrchestrationCoordinatorQuestionStateRecord {
128
128
  export interface OrchestrationCoordinatorRouteContextRecord {
129
129
  coordinatorSession: string;
130
130
  chatKey: string;
131
+ sessionAlias?: string;
131
132
  accountId?: string;
132
133
  replyContextToken?: string;
134
+ channel?: string;
135
+ chatType?: "direct" | "group";
136
+ senderId?: string;
137
+ senderName?: string;
138
+ groupId?: string;
139
+ isOwner?: boolean;
133
140
  updatedAt: string;
134
141
  }
135
142
  export interface OrchestrationHumanQuestionPackageMessageRecord {
@@ -1,6 +1,6 @@
1
1
  export type { ChannelPluginDefinition } from "./channels/plugin.js";
2
2
  export type { ChannelFactory, CreateChannelDeps } from "./channels/create-channel.js";
3
- export type { ChannelStartInput, ConsumerLock, ConsumerLockMetadata, ConsumerLockOptions, CoordinatorMessageInput, MessageChannelRuntime, OrchestrationDeliveryCallbacks, OutboundQuota, ToolUseEvent, ToolUseKind, ToolUseStatus, } from "./channels/types.js";
3
+ export type { ChannelStartInput, ConsumerLock, ConsumerLockMetadata, ConsumerLockOptions, CoordinatorMessageInput, MessageChannelRuntime, ScheduledChannelMessageInput, OrchestrationDeliveryCallbacks, OutboundQuota, ToolUseEvent, ToolUseKind, ToolUseStatus, } from "./channels/types.js";
4
4
  export type { ChannelCliInput, ChannelCliIo, ChannelCliParseResult, ChannelCliProvider, ChannelCliValidationIssue, } from "./channels/cli/provider.js";
5
5
  export type { ChannelRuntimeConfig } from "./config/types.js";
6
6
  export type { AppLogger } from "./logging/app-logger.js";
@@ -160,7 +160,7 @@ function validatePluginCompatibility(metadata, context) {
160
160
  }
161
161
  }
162
162
  }
163
- var WEACPX_PLUGIN_API_VERSION = 1, WEACPX_PLUGIN_API_SUPPORTED_VERSIONS, WEACPX_PLUGIN_MIN_CORE_VERSION = "0.4.0", SEMVER_RE;
163
+ var WEACPX_PLUGIN_API_VERSION = 1, WEACPX_PLUGIN_API_SUPPORTED_VERSIONS, WEACPX_PLUGIN_MIN_CORE_VERSION = "0.5.0", SEMVER_RE;
164
164
  var init_compatibility = __esm(() => {
165
165
  WEACPX_PLUGIN_API_SUPPORTED_VERSIONS = [1];
166
166
  SEMVER_RE = /^(\d+)\.(\d+)\.(\d+)$/;
@@ -1,6 +1,6 @@
1
1
  export declare const WEACPX_PLUGIN_API_VERSION: 1;
2
2
  export declare const WEACPX_PLUGIN_API_SUPPORTED_VERSIONS: readonly number[];
3
- export declare const WEACPX_PLUGIN_MIN_CORE_VERSION: "0.4.0";
3
+ export declare const WEACPX_PLUGIN_MIN_CORE_VERSION: "0.5.0";
4
4
  export declare function normalizeCoreVersionForCompat(version: string): string;
5
5
  export declare function compareSemver(a: string, b: string): -1 | 0 | 1;
6
6
  export declare function isVersionSatisfied(current: string, requirement: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ChannelMediaAttachment, OutboundChannelMedia } from "../../channels/media-types.js";
2
- import type { ToolUseEvent } from "../../channels/types.js";
2
+ import type { ScheduledSessionDescriptor, ToolUseEvent } from "../../channels/types.js";
3
3
  import type { PerfSpan } from "../../perf/perf-tracer.js";
4
4
  /**
5
5
  * Agent interface — any AI backend that can handle a chat message.
@@ -62,6 +62,10 @@ export interface ChatRequestMetadata {
62
62
  senderName?: string;
63
63
  groupId?: string;
64
64
  isOwner?: boolean;
65
+ /** Internal weacpx session alias to use for non-interactive scheduled prompts. */
66
+ scheduledSessionAlias?: string;
67
+ /** Transient session descriptor for temp-mode scheduled prompts (no persisted alias). */
68
+ scheduledSessionDescriptor?: ScheduledSessionDescriptor;
65
69
  }
66
70
  export interface ChatResponse {
67
71
  /**
@@ -0,0 +1,22 @@
1
+ import type { AppLogger } from "../../logging/app-logger";
2
+ import type { ScheduledChannelMessageInput } from "../../channels/types";
3
+ import type { Agent } from "../agent/interface";
4
+ import type { PendingFinalChunk } from "./quota-manager";
5
+ import { sendMessageWeixin } from "./send";
6
+ export interface ScheduledTurnDeps {
7
+ agent: Agent;
8
+ listAccountIds: () => string[];
9
+ resolveAccount: (accountId: string) => {
10
+ accountId: string;
11
+ baseUrl: string;
12
+ token?: string;
13
+ };
14
+ getContextToken: (accountId: string, userId: string) => string | undefined;
15
+ reserveMidSegment: (chatKey: string) => boolean;
16
+ reserveFinal: (chatKey: string) => boolean;
17
+ finalRemaining?: (chatKey: string) => number;
18
+ enqueuePendingFinal?: (chatKey: string, chunks: PendingFinalChunk[]) => void;
19
+ sendMessage?: typeof sendMessageWeixin;
20
+ logger: AppLogger;
21
+ }
22
+ export declare function executeScheduledTurn(input: ScheduledChannelMessageInput, deps: ScheduledTurnDeps): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weacpx",
3
- "version": "0.4.10",
3
+ "version": "0.5.1",
4
4
  "description": "使用微信 ClawBot 随时随地通过 `acpx` 控制 Claude Code、Codex 等 Agents。",
5
5
  "keywords": [
6
6
  "acpx",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@modelcontextprotocol/sdk": "^1.29.0",
68
- "acpx": "^0.8.0",
68
+ "acpx": "^0.9.0",
69
69
  "node-pty": "^1.1.0",
70
70
  "proper-lockfile": "^4.1.2",
71
71
  "protobufjs": "^7.5.6",