@a1hvdy/cc-openclaw 0.6.0 → 0.7.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/src/lib/config.d.ts +2 -0
- package/dist/src/lib/config.js +19 -0
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/trajectory.d.ts +1 -1
- package/dist/src/lib/trajectory.js.map +1 -1
- package/dist/src/lib/vendor-paths.d.ts +6 -4
- package/dist/src/lib/vendor-paths.js +21 -14
- package/dist/src/lib/vendor-paths.js.map +1 -1
- package/dist/src/openai-compat/openai-compat.d.ts +7 -1
- package/dist/src/openai-compat/openai-compat.js +8 -1
- package/dist/src/openai-compat/openai-compat.js.map +1 -1
- package/dist/src/openai-compat/sse-translator.d.ts +23 -3
- package/dist/src/openai-compat/sse-translator.js +45 -6
- package/dist/src/openai-compat/sse-translator.js.map +1 -1
- package/package.json +2 -3
- package/vendor/base-oneshot-session.d.ts +0 -87
- package/vendor/base-oneshot-session.js +0 -227
- package/vendor/base-oneshot-session.js.map +0 -1
- package/vendor/circuit-breaker.d.ts +0 -21
- package/vendor/circuit-breaker.js +0 -47
- package/vendor/circuit-breaker.js.map +0 -1
- package/vendor/consensus.d.ts +0 -20
- package/vendor/consensus.js +0 -52
- package/vendor/consensus.js.map +0 -1
- package/vendor/constants.d.ts +0 -130
- package/vendor/constants.js +0 -139
- package/vendor/constants.js.map +0 -1
- package/vendor/council.d.ts +0 -67
- package/vendor/council.js +0 -913
- package/vendor/council.js.map +0 -1
- package/vendor/embedded-server.d.ts +0 -25
- package/vendor/embedded-server.js +0 -373
- package/vendor/embedded-server.js.map +0 -1
- package/vendor/inbox-manager.d.ts +0 -38
- package/vendor/inbox-manager.js +0 -111
- package/vendor/inbox-manager.js.map +0 -1
- package/vendor/index.d.ts +0 -63
- package/vendor/index.js +0 -705
- package/vendor/index.js.map +0 -1
- package/vendor/logger.d.ts +0 -16
- package/vendor/logger.js +0 -44
- package/vendor/logger.js.map +0 -1
- package/vendor/models.d.ts +0 -69
- package/vendor/models.js +0 -289
- package/vendor/models.js.map +0 -1
- package/vendor/openai-compat.d.ts +0 -197
- package/vendor/openai-compat.js +0 -765
- package/vendor/openai-compat.js.map +0 -1
- package/vendor/persistent-codex-session.d.ts +0 -16
- package/vendor/persistent-codex-session.js +0 -105
- package/vendor/persistent-codex-session.js.map +0 -1
- package/vendor/persistent-cursor-session.d.ts +0 -21
- package/vendor/persistent-cursor-session.js +0 -241
- package/vendor/persistent-cursor-session.js.map +0 -1
- package/vendor/persistent-custom-session.d.ts +0 -78
- package/vendor/persistent-custom-session.js +0 -937
- package/vendor/persistent-custom-session.js.map +0 -1
- package/vendor/persistent-gemini-session.d.ts +0 -21
- package/vendor/persistent-gemini-session.js +0 -216
- package/vendor/persistent-gemini-session.js.map +0 -1
- package/vendor/persistent-session.d.ts +0 -74
- package/vendor/persistent-session.js +0 -698
- package/vendor/persistent-session.js.map +0 -1
- package/vendor/proxy/anthropic-adapter.d.ts +0 -136
- package/vendor/proxy/anthropic-adapter.js +0 -392
- package/vendor/proxy/anthropic-adapter.js.map +0 -1
- package/vendor/proxy/handler.d.ts +0 -39
- package/vendor/proxy/handler.js +0 -323
- package/vendor/proxy/handler.js.map +0 -1
- package/vendor/proxy/schema-cleaner.d.ts +0 -11
- package/vendor/proxy/schema-cleaner.js +0 -34
- package/vendor/proxy/schema-cleaner.js.map +0 -1
- package/vendor/proxy/thought-cache.d.ts +0 -19
- package/vendor/proxy/thought-cache.js +0 -53
- package/vendor/proxy/thought-cache.js.map +0 -1
- package/vendor/session-manager.d.ts +0 -211
- package/vendor/session-manager.js +0 -1345
- package/vendor/session-manager.js.map +0 -1
- package/vendor/skill-resolver.js +0 -107
- package/vendor/types.d.ts +0 -466
- package/vendor/types.js +0 -8
- package/vendor/types.js.map +0 -1
- package/vendor/validation.d.ts +0 -31
- package/vendor/validation.js +0 -104
- package/vendor/validation.js.map +0 -1
package/vendor/constants.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared constants — consolidates magic numbers scattered across the codebase.
|
|
3
|
-
*
|
|
4
|
-
* Grouped by domain. Import what you need rather than using inline numbers.
|
|
5
|
-
*/
|
|
6
|
-
// ─── Context & Token Limits ────────────────────────────────────────────────
|
|
7
|
-
/** Token threshold that triggers the onContextHigh hook */
|
|
8
|
-
export const CONTEXT_HIGH_THRESHOLD = 140_000;
|
|
9
|
-
// ─── History ────────────────────────────────────────────────────────────────
|
|
10
|
-
/** Max history entries kept in memory per session (oldest evicted via shift) */
|
|
11
|
-
export const MAX_HISTORY_ITEMS = 100;
|
|
12
|
-
/** Default number of history entries returned by getHistory() */
|
|
13
|
-
export const DEFAULT_HISTORY_LIMIT = 50;
|
|
14
|
-
/** Number of history entries fetched for grep operations */
|
|
15
|
-
export const GREP_HISTORY_FETCH = 500;
|
|
16
|
-
// ─── Timeouts ───────────────────────────────────────────────────────────────
|
|
17
|
-
/** Wait for session init/ready event after spawn */
|
|
18
|
-
export const SESSION_READY_TIMEOUT_MS = 30_000;
|
|
19
|
-
/** Fallback delay before checking if proc is alive (resume path) */
|
|
20
|
-
export const SESSION_READY_FALLBACK_MS = 2_000;
|
|
21
|
-
/** Default timeout for a send() / turn completion */
|
|
22
|
-
export const TURN_TIMEOUT_MS = 300_000;
|
|
23
|
-
/** Timeout for compact / context summary operations */
|
|
24
|
-
export const COMPACT_TIMEOUT_MS = 60_000;
|
|
25
|
-
/** Delay before SIGKILL after initial SIGTERM on stop() */
|
|
26
|
-
export const STOP_SIGKILL_DELAY_MS = 3_000;
|
|
27
|
-
/** Timeout for most git CLI operations (branch, checkout, log, diff) */
|
|
28
|
-
export const GIT_CMD_TIMEOUT_MS = 5_000;
|
|
29
|
-
/** Timeout for git worktree add/remove (heavier operations) */
|
|
30
|
-
export const WORKTREE_CMD_TIMEOUT_MS = 10_000;
|
|
31
|
-
/** Default per-agent timeout in council */
|
|
32
|
-
export const DEFAULT_AGENT_TIMEOUT_MS = 1_800_000;
|
|
33
|
-
/** Delay between council rounds */
|
|
34
|
-
export const INTER_ROUND_DELAY_MS = 3_000;
|
|
35
|
-
/** Delay before retrying on empty agent response */
|
|
36
|
-
export const EMPTY_RESPONSE_RETRY_DELAY_MS = 5_000;
|
|
37
|
-
/** Timeout for council follow-up prompts */
|
|
38
|
-
export const FOLLOWUP_TIMEOUT_MS = 60_000;
|
|
39
|
-
/** Timeout for team list operations */
|
|
40
|
-
export const TEAM_LIST_TIMEOUT_MS = 30_000;
|
|
41
|
-
/** Timeout for team send operations */
|
|
42
|
-
export const TEAM_SEND_TIMEOUT_MS = 120_000;
|
|
43
|
-
/** Timeout for ultraplan sessions */
|
|
44
|
-
export const ULTRAPLAN_TIMEOUT_MS = 1_800_000;
|
|
45
|
-
/** How long completed results remain queryable */
|
|
46
|
-
export const RESULT_TTL_MS = 1_800_000;
|
|
47
|
-
/** Session TTL cleanup check interval */
|
|
48
|
-
export const CLEANUP_INTERVAL_MS = 60_000;
|
|
49
|
-
/** Debounce delay for persisted session writes */
|
|
50
|
-
export const DEBOUNCED_SAVE_MS = 5_000;
|
|
51
|
-
/** Persisted sessions disk TTL (7 days) */
|
|
52
|
-
export const PERSIST_DISK_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
53
|
-
/** Fetch timeout for proxy forward requests */
|
|
54
|
-
export const FETCH_TIMEOUT_MS = 600_000;
|
|
55
|
-
/** Ultrareview polling interval */
|
|
56
|
-
export const ULTRAREVIEW_POLL_INTERVAL_MS = 5_000;
|
|
57
|
-
// ─── Server ─────────────────────────────────────────────────────────────────
|
|
58
|
-
/** Default port for the embedded HTTP server */
|
|
59
|
-
export const DEFAULT_SERVER_PORT = 18_796;
|
|
60
|
-
/** Maximum request body size (5 MB) */
|
|
61
|
-
export const MAX_BODY_SIZE = 5_242_880;
|
|
62
|
-
/** Rate limit: max requests per window per IP */
|
|
63
|
-
export const RATE_LIMIT_MAX_REQUESTS = 300;
|
|
64
|
-
/** Rate limit: sliding window duration */
|
|
65
|
-
export const RATE_LIMIT_WINDOW_MS = 60_000;
|
|
66
|
-
// ─── Council ────────────────────────────────────────────────────────────────
|
|
67
|
-
/** Minimum task description length */
|
|
68
|
-
export const MIN_TASK_LENGTH = 5;
|
|
69
|
-
/** Max retries for empty agent responses */
|
|
70
|
-
export const EMPTY_RESPONSE_MAX_RETRIES = 2;
|
|
71
|
-
/** Minimum response length to consider complete */
|
|
72
|
-
export const MIN_COMPLETE_RESPONSE_LENGTH = 100;
|
|
73
|
-
/** Max follow-up retries per agent */
|
|
74
|
-
export const FOLLOWUP_MAX_RETRIES = 2;
|
|
75
|
-
/** Character limit for history preview in council prompts */
|
|
76
|
-
export const HISTORY_PREVIEW_CHARS = 1_500;
|
|
77
|
-
/** Character limit for agent summary in review */
|
|
78
|
-
export const SUMMARY_PREVIEW_CHARS = 500;
|
|
79
|
-
/** Character limit for short summary in transcript */
|
|
80
|
-
export const SUMMARY_SHORT_CHARS = 400;
|
|
81
|
-
/** Character limit for compact context */
|
|
82
|
-
export const COMPACT_CONTEXT_CHARS = 300;
|
|
83
|
-
/** Default max rounds in council collaboration */
|
|
84
|
-
export const DEFAULT_MAX_ROUNDS = 15;
|
|
85
|
-
/** Default max turns per agent */
|
|
86
|
-
export const DEFAULT_MAX_TURNS_PER_AGENT = 50;
|
|
87
|
-
/** Git log depth for council review */
|
|
88
|
-
export const GIT_LOG_DEPTH = 50;
|
|
89
|
-
// ─── Session Manager Limits ─────────────────────────────────────────────────
|
|
90
|
-
/** Max messages per session inbox */
|
|
91
|
-
export const MAX_INBOX_SIZE = 200;
|
|
92
|
-
// ─── Circuit Breaker ────────────────────────────────────────────────────────
|
|
93
|
-
/** Consecutive failures before circuit opens */
|
|
94
|
-
export const CIRCUIT_BREAKER_THRESHOLD = 3;
|
|
95
|
-
/** Base backoff delay (doubles each failure) */
|
|
96
|
-
export const CIRCUIT_BREAKER_BACKOFF_BASE_MS = 1_000;
|
|
97
|
-
/** Maximum backoff duration cap */
|
|
98
|
-
export const CIRCUIT_BREAKER_MAX_BACKOFF_MS = 300_000;
|
|
99
|
-
// ─── Session Events ─────────────────────────────────────────────────────────
|
|
100
|
-
export const SESSION_EVENT = {
|
|
101
|
-
READY: 'ready',
|
|
102
|
-
INIT: 'init',
|
|
103
|
-
TEXT: 'text',
|
|
104
|
-
TOOL_USE: 'tool_use',
|
|
105
|
-
TOOL_RESULT: 'tool_result',
|
|
106
|
-
RESULT: 'result',
|
|
107
|
-
TURN_COMPLETE: 'turn_complete',
|
|
108
|
-
ERROR: 'error',
|
|
109
|
-
LOG: 'log',
|
|
110
|
-
CLOSE: 'close',
|
|
111
|
-
PAUSED: 'paused',
|
|
112
|
-
RESUMED: 'resumed',
|
|
113
|
-
SYSTEM: 'system',
|
|
114
|
-
STREAM_EVENT: 'stream_event',
|
|
115
|
-
USER_ECHO: 'user_echo',
|
|
116
|
-
ASSISTANT: 'assistant',
|
|
117
|
-
EVENT: 'event',
|
|
118
|
-
};
|
|
119
|
-
// ─── OpenAI Compat ───────────────────────────────────────────────────────────
|
|
120
|
-
/** Default model when the OpenAI-compat request omits `model` */
|
|
121
|
-
export const OPENAI_COMPAT_DEFAULT_MODEL = 'claude-sonnet-4-6';
|
|
122
|
-
/** Context utilization % threshold for auto-compact */
|
|
123
|
-
export const OPENAI_COMPAT_AUTO_COMPACT_THRESHOLD = 80;
|
|
124
|
-
/** Session name prefix for OpenAI-compat sessions */
|
|
125
|
-
export const OPENAI_COMPAT_SESSION_PREFIX = 'openai-';
|
|
126
|
-
/**
|
|
127
|
-
* Default for the legacy new-conversation heuristic gate.
|
|
128
|
-
*
|
|
129
|
-
* When env var `OPENAI_COMPAT_NEW_CONVO_HEURISTIC=1` is set, the old
|
|
130
|
-
* "system + single user ⇒ new conversation" rule is restored for webchat
|
|
131
|
-
* frontends (ChatGPT-Next-Web, Open WebUI, etc) that re-send the full
|
|
132
|
-
* transcript every turn. Default off: assumes upstream clients forward
|
|
133
|
-
* only the latest turn (OpenClaw main agent loop, cron jobs, subagents).
|
|
134
|
-
*
|
|
135
|
-
* The constant exists as a documentation anchor; openai-compat.ts reads
|
|
136
|
-
* the env var directly so the value can be flipped without restart.
|
|
137
|
-
*/
|
|
138
|
-
export const OPENAI_COMPAT_NEW_CONVO_HEURISTIC_DEFAULT = false;
|
|
139
|
-
//# sourceMappingURL=constants.js.map
|
package/vendor/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8EAA8E;AAE9E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAE9C,+EAA+E;AAE/E,gFAAgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,+EAA+E;AAE/E,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC/C,oEAAoE;AACpE,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAC/C,qDAAqD;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,uDAAuD;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAC3C,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACxC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC9C,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAClD,mCAAmC;AACnC,MAAM,CAAC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EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;CACN,CAAC;AAIX,gFAAgF;AAEhF,iEAAiE;AACjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAC/D,uDAAuD;AACvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,qDAAqD;AACrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,SAAS,CAAC;AACtD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,KAAK,CAAC"}
|
package/vendor/council.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Council — Multi-agent collaboration engine
|
|
3
|
-
*
|
|
4
|
-
* Ported from three-minds and adapted to use SessionManager + ISession
|
|
5
|
-
* directly (no HTTP/SSE to external services).
|
|
6
|
-
*
|
|
7
|
-
* Key patterns:
|
|
8
|
-
* - Git worktree isolation per agent
|
|
9
|
-
* - Two-phase protocol: planning round → execution rounds
|
|
10
|
-
* - Consensus voting: all agents vote YES to complete
|
|
11
|
-
* - Parallel execution via Promise.allSettled
|
|
12
|
-
* - Engine-agnostic: agents can use Claude, Codex, or any ISession engine
|
|
13
|
-
*/
|
|
14
|
-
import { EventEmitter } from 'node:events';
|
|
15
|
-
import { type CouncilConfig, type CouncilSession, type CouncilReviewResult, type CouncilAcceptResult, type CouncilRejectResult, type SessionConfig, type SessionInfo, type SendOptions, type SendResult } from './types.js';
|
|
16
|
-
import { type Logger } from './logger.js';
|
|
17
|
-
interface SessionManagerLike {
|
|
18
|
-
startSession(config: Partial<SessionConfig> & {
|
|
19
|
-
name?: string;
|
|
20
|
-
}): Promise<SessionInfo>;
|
|
21
|
-
sendMessage(name: string, message: string, options?: Partial<SendOptions>): Promise<SendResult>;
|
|
22
|
-
stopSession(name: string): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export declare class Council extends EventEmitter {
|
|
25
|
-
private config;
|
|
26
|
-
private manager;
|
|
27
|
-
private agentTimeoutMs;
|
|
28
|
-
private _aborted;
|
|
29
|
-
private _activeSessions;
|
|
30
|
-
private _session;
|
|
31
|
-
private _pendingInjection;
|
|
32
|
-
private logger;
|
|
33
|
-
constructor(config: CouncilConfig, manager: SessionManagerLike, logger?: Logger);
|
|
34
|
-
getSession(): CouncilSession | undefined;
|
|
35
|
-
injectMessage(message: string): void;
|
|
36
|
-
abort(): void;
|
|
37
|
-
private emitEvent;
|
|
38
|
-
private runSingleAgent;
|
|
39
|
-
init(task: string): CouncilSession;
|
|
40
|
-
run(task?: string): Promise<CouncilSession>;
|
|
41
|
-
private generateSummary;
|
|
42
|
-
private generateCompactContext;
|
|
43
|
-
private saveTranscript;
|
|
44
|
-
/**
|
|
45
|
-
* Produce a structured review of the council's output.
|
|
46
|
-
* Lists all changed files, branches, worktrees, plan.md status, and agent summaries.
|
|
47
|
-
* Does NOT modify any state — purely informational.
|
|
48
|
-
*/
|
|
49
|
-
review(): Promise<CouncilReviewResult>;
|
|
50
|
-
/**
|
|
51
|
-
* Internal cleanup helper — removes worktrees, branches, plan.md, and reviews/.
|
|
52
|
-
* Each cleanup step is independently gated by the `options` flags.
|
|
53
|
-
*/
|
|
54
|
-
private _cleanup;
|
|
55
|
-
/**
|
|
56
|
-
* Accept the council's work: clean up worktrees, branches, plan.md, and reviews/.
|
|
57
|
-
* Should only be called after reviewing via `review()`.
|
|
58
|
-
*/
|
|
59
|
-
accept(): Promise<CouncilAcceptResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Reject the council's work: rewrite plan.md with feedback.
|
|
62
|
-
* Does NOT delete any worktrees or branches — the council can retry.
|
|
63
|
-
*/
|
|
64
|
-
reject(feedback: string): Promise<CouncilRejectResult>;
|
|
65
|
-
}
|
|
66
|
-
export declare function getDefaultCouncilConfig(projectDir: string): CouncilConfig;
|
|
67
|
-
export {};
|