crewly 1.20.361 → 1.20.362
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/config/roles/team-leader/prompt.md +1 -1
- package/config/roles/team-leader/tl-addon.md +1 -1
- package/config/skills/team-leader/delegate-task/SKILL.md +21 -6
- package/config/skills/team-leader/delegate-task/execute.sh +12 -1
- package/dist/backend/backend/src/constants.d.ts +153 -6
- package/dist/backend/backend/src/constants.d.ts.map +1 -1
- package/dist/backend/backend/src/constants.js +153 -6
- package/dist/backend/backend/src/constants.js.map +1 -1
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.js +7 -4
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +53 -1
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/services/agent/follow-through.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/follow-through.wiring.js +2 -0
- package/dist/backend/backend/src/services/agent/follow-through.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/agent/handover-interrupted.d.ts +76 -0
- package/dist/backend/backend/src/services/agent/handover-interrupted.d.ts.map +1 -0
- package/dist/backend/backend/src/services/agent/handover-interrupted.js +139 -0
- package/dist/backend/backend/src/services/agent/handover-interrupted.js.map +1 -0
- package/dist/backend/backend/src/services/agent/handover-pointers.d.ts +4 -0
- package/dist/backend/backend/src/services/agent/handover-pointers.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/handover-pointers.js +11 -4
- package/dist/backend/backend/src/services/agent/handover-pointers.js.map +1 -1
- package/dist/backend/backend/src/services/agent/idle-work-guard.d.ts +3 -1
- package/dist/backend/backend/src/services/agent/idle-work-guard.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/idle-work-guard.js +2 -0
- package/dist/backend/backend/src/services/agent/idle-work-guard.js.map +1 -1
- package/dist/backend/backend/src/services/agent/resource-mode-protection.d.ts +5 -1
- package/dist/backend/backend/src/services/agent/resource-mode-protection.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/resource-mode-protection.js +6 -1
- package/dist/backend/backend/src/services/agent/resource-mode-protection.js.map +1 -1
- package/dist/backend/backend/src/services/agent/runtime-session-recovery.d.ts +7 -0
- package/dist/backend/backend/src/services/agent/runtime-session-recovery.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/runtime-session-recovery.js +18 -1
- package/dist/backend/backend/src/services/agent/runtime-session-recovery.js.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.singleton.d.ts +8 -0
- package/dist/backend/backend/src/services/chat-v2/chat-v2.singleton.d.ts.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.singleton.js +10 -0
- package/dist/backend/backend/src/services/chat-v2/chat-v2.singleton.js.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-item-extractor.d.ts +43 -2
- package/dist/backend/backend/src/services/open-items/open-item-extractor.d.ts.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-item-extractor.js +124 -13
- package/dist/backend/backend/src/services/open-items/open-item-extractor.js.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-items.service.d.ts +40 -1
- package/dist/backend/backend/src/services/open-items/open-items.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-items.service.js +76 -3
- package/dist/backend/backend/src/services/open-items/open-items.service.js.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-items.wiring.d.ts +8 -0
- package/dist/backend/backend/src/services/open-items/open-items.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/open-items/open-items.wiring.js +19 -1
- package/dist/backend/backend/src/services/open-items/open-items.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/orc/owner-completion-report.service.d.ts +35 -19
- package/dist/backend/backend/src/services/orc/owner-completion-report.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orc/owner-completion-report.service.js +60 -63
- package/dist/backend/backend/src/services/orc/owner-completion-report.service.js.map +1 -1
- package/dist/backend/backend/src/services/orc/owner-completion-report.text.d.ts +86 -0
- package/dist/backend/backend/src/services/orc/owner-completion-report.text.d.ts.map +1 -0
- package/dist/backend/backend/src/services/orc/owner-completion-report.text.js +170 -0
- package/dist/backend/backend/src/services/orc/owner-completion-report.text.js.map +1 -0
- package/dist/backend/backend/src/services/orc/owner-completion-report.wiring.d.ts +24 -0
- package/dist/backend/backend/src/services/orc/owner-completion-report.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orc/owner-completion-report.wiring.js +38 -1
- package/dist/backend/backend/src/services/orc/owner-completion-report.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/orc/reply-destination.wiring.d.ts +2 -0
- package/dist/backend/backend/src/services/orc/reply-destination.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orc/reply-destination.wiring.js +8 -3
- package/dist/backend/backend/src/services/orc/reply-destination.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/orc/work-item-destination.d.ts +76 -0
- package/dist/backend/backend/src/services/orc/work-item-destination.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orc/work-item-destination.js +83 -3
- package/dist/backend/backend/src/services/orc/work-item-destination.js.map +1 -1
- package/dist/backend/backend/src/services/orc/work-item-destination.wiring.d.ts +31 -2
- package/dist/backend/backend/src/services/orc/work-item-destination.wiring.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orc/work-item-destination.wiring.js +38 -0
- package/dist/backend/backend/src/services/orc/work-item-destination.wiring.js.map +1 -1
- package/dist/backend/backend/src/services/stall/background-run-detector.d.ts +56 -0
- package/dist/backend/backend/src/services/stall/background-run-detector.d.ts.map +1 -0
- package/dist/backend/backend/src/services/stall/background-run-detector.js +93 -0
- package/dist/backend/backend/src/services/stall/background-run-detector.js.map +1 -0
- package/dist/backend/backend/src/services/stall/claim-check.d.ts +60 -0
- package/dist/backend/backend/src/services/stall/claim-check.d.ts.map +1 -0
- package/dist/backend/backend/src/services/stall/claim-check.js +98 -0
- package/dist/backend/backend/src/services/stall/claim-check.js.map +1 -0
- package/dist/backend/backend/src/services/stall/in-flight-runs.store.d.ts +110 -0
- package/dist/backend/backend/src/services/stall/in-flight-runs.store.d.ts.map +1 -0
- package/dist/backend/backend/src/services/stall/in-flight-runs.store.js +109 -0
- package/dist/backend/backend/src/services/stall/in-flight-runs.store.js.map +1 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.service.d.ts +456 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.service.js +854 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.service.js.map +1 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.wiring.d.ts +98 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.wiring.d.ts.map +1 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.wiring.js +217 -0
- package/dist/backend/backend/src/services/stall/stall-watcher.wiring.js.map +1 -0
- package/dist/backend/backend/src/services/task-pool/task-pool.service.d.ts +53 -0
- package/dist/backend/backend/src/services/task-pool/task-pool.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/task-pool/task-pool.service.js +162 -15
- package/dist/backend/backend/src/services/task-pool/task-pool.service.js.map +1 -1
- package/dist/backend/backend/src/services/tl-delegation/tl-delegation.service.js +1 -1
- package/dist/backend/backend/src/services/tl-delegation/tl-delegation.service.js.map +1 -1
- package/dist/backend/backend/src/types/v2/open-item.types.d.ts +2 -0
- package/dist/backend/backend/src/types/v2/open-item.types.d.ts.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/dist/cli/backend/src/constants.d.ts +153 -6
- package/dist/cli/backend/src/constants.d.ts.map +1 -1
- package/dist/cli/backend/src/constants.js +153 -6
- package/dist/cli/backend/src/constants.js.map +1 -1
- package/dist/cli/backend/src/services/agent/handover-interrupted.d.ts +76 -0
- package/dist/cli/backend/src/services/agent/handover-interrupted.d.ts.map +1 -0
- package/dist/cli/backend/src/services/agent/handover-interrupted.js +139 -0
- package/dist/cli/backend/src/services/agent/handover-interrupted.js.map +1 -0
- package/dist/cli/backend/src/services/agent/handover-pointers.d.ts +4 -0
- package/dist/cli/backend/src/services/agent/handover-pointers.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/handover-pointers.js +11 -4
- package/dist/cli/backend/src/services/agent/handover-pointers.js.map +1 -1
- package/dist/cli/backend/src/services/agent/runtime-session-recovery.d.ts +7 -0
- package/dist/cli/backend/src/services/agent/runtime-session-recovery.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/runtime-session-recovery.js +18 -1
- package/dist/cli/backend/src/services/agent/runtime-session-recovery.js.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.singleton.d.ts +8 -0
- package/dist/cli/backend/src/services/chat-v2/chat-v2.singleton.d.ts.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.singleton.js +10 -0
- package/dist/cli/backend/src/services/chat-v2/chat-v2.singleton.js.map +1 -1
- package/dist/cli/backend/src/services/open-items/open-item-extractor.d.ts +43 -2
- package/dist/cli/backend/src/services/open-items/open-item-extractor.d.ts.map +1 -1
- package/dist/cli/backend/src/services/open-items/open-item-extractor.js +124 -13
- package/dist/cli/backend/src/services/open-items/open-item-extractor.js.map +1 -1
- package/dist/cli/backend/src/services/open-items/open-items.service.d.ts +40 -1
- package/dist/cli/backend/src/services/open-items/open-items.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/open-items/open-items.service.js +76 -3
- package/dist/cli/backend/src/services/open-items/open-items.service.js.map +1 -1
- package/dist/cli/backend/src/services/orc/work-item-destination.d.ts +76 -0
- package/dist/cli/backend/src/services/orc/work-item-destination.d.ts.map +1 -1
- package/dist/cli/backend/src/services/orc/work-item-destination.js +83 -3
- package/dist/cli/backend/src/services/orc/work-item-destination.js.map +1 -1
- package/dist/cli/backend/src/services/task-pool/task-pool.service.d.ts +53 -0
- package/dist/cli/backend/src/services/task-pool/task-pool.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/task-pool/task-pool.service.js +162 -15
- package/dist/cli/backend/src/services/task-pool/task-pool.service.js.map +1 -1
- package/dist/cli/backend/src/types/v2/open-item.types.d.ts +2 -0
- package/dist/cli/backend/src/types/v2/open-item.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3464,6 +3464,35 @@ export const HANDOVER_POINTERS_CONSTANTS = {
|
|
|
3464
3464
|
START_MARK: '<!-- handover-pointers -->',
|
|
3465
3465
|
END_MARK: '<!-- /handover-pointers -->',
|
|
3466
3466
|
};
|
|
3467
|
+
/**
|
|
3468
|
+
* Work a restart cut off inside an agent's conversation (crewly#1361): a
|
|
3469
|
+
* Claude Code transcript whose `tool_use` never received its `tool_result`
|
|
3470
|
+
* before the cutoff. Sub-agents (Task / Agent tool) and background or
|
|
3471
|
+
* long-running shell commands die with the process; the handover says so
|
|
3472
|
+
* instead of carrying the agent's last "still in progress" narration.
|
|
3473
|
+
*/
|
|
3474
|
+
export const HANDOVER_CONSTANTS = {
|
|
3475
|
+
/** Heading of the section listing the interrupted work */
|
|
3476
|
+
INTERRUPTED_HEADING: '## Interrupted by the restart',
|
|
3477
|
+
/** At most this many interrupted calls are listed */
|
|
3478
|
+
INTERRUPTED_MAX_ITEMS: 5,
|
|
3479
|
+
/** Characters kept of a sub-agent's prompt / a command */
|
|
3480
|
+
INTERRUPTED_TEXT_MAX_CHARS: 200,
|
|
3481
|
+
/** Tool names that start a sub-agent inside the conversation */
|
|
3482
|
+
SUBAGENT_TOOLS: ['Task', 'Agent'],
|
|
3483
|
+
/** Tool names that run shell commands */
|
|
3484
|
+
SHELL_TOOLS: ['Bash'],
|
|
3485
|
+
/**
|
|
3486
|
+
* A shell command that looks long-running (a render, encode, build or a
|
|
3487
|
+
* command sent to the background) even without `run_in_background`
|
|
3488
|
+
*/
|
|
3489
|
+
LONG_COMMAND_PATTERN: /\b(?:ffmpeg|remotion|render|encode|transcode|whisper|nohup|caffeinate|npm run build|npx tsc)\b|&\s*$|\bsleep\s+\d{3,}/i,
|
|
3490
|
+
/** Bullet prefixes of the section (also how the pointers header reads it back) */
|
|
3491
|
+
SUBAGENT_LINE_PREFIX: '- A sub-agent was running: ',
|
|
3492
|
+
COMMAND_LINE_PREFIX: '- A background command was running: ',
|
|
3493
|
+
SUBAGENT_LINE_SUFFIX: '. It did not finish and is not running now. Restart it or report that it was lost.',
|
|
3494
|
+
COMMAND_LINE_SUFFIX: '. It is not running now.',
|
|
3495
|
+
};
|
|
3467
3496
|
/**
|
|
3468
3497
|
* Fresh conversation per new task for Claude Code team members (never the
|
|
3469
3498
|
* orchestrator): before a work item with a different root than the last one
|
|
@@ -7244,6 +7273,18 @@ export const OPEN_ITEMS_CONSTANTS = {
|
|
|
7244
7273
|
DEFAULT_DUE_HOUR_LOCAL: 12,
|
|
7245
7274
|
/** A commitment with no time is due this long after it was made (ms) */
|
|
7246
7275
|
DEFAULT_DUE_MS: 24 * 60 * 60 * 1000,
|
|
7276
|
+
/**
|
|
7277
|
+
* A commitment with no time made live in the owner's conversation (the
|
|
7278
|
+
* owner is waiting for the reply) is due this long after it was made (ms).
|
|
7279
|
+
* Backfilled and gate-opened promises keep DEFAULT_DUE_MS (crewly#1360).
|
|
7280
|
+
*/
|
|
7281
|
+
CHAT_PROMISE_DEFAULT_DUE_MS: 4 * 60 * 60 * 1000,
|
|
7282
|
+
/**
|
|
7283
|
+
* An estimate the same agent states in the same thread this long after an
|
|
7284
|
+
* undated promise ("预计一小时左右" a minute after "改完发你") dates that
|
|
7285
|
+
* promise (ms) (crewly#1360)
|
|
7286
|
+
*/
|
|
7287
|
+
ESTIMATE_WINDOW_MS: 10 * 60 * 1000,
|
|
7247
7288
|
/** The same words by the same agent this close together are one item (a reply recorded twice) (ms) */
|
|
7248
7289
|
DUPLICATE_WINDOW_MS: 10 * 60 * 1000,
|
|
7249
7290
|
/** The same agent's two promises this close together, about the same deliverable, are one (the newer stands) (ms) */
|
|
@@ -7355,6 +7396,15 @@ export const WORK_ITEM_DESTINATION_CONSTANTS = {
|
|
|
7355
7396
|
METADATA_KEY: 'origin',
|
|
7356
7397
|
/** An owner turn origin newer than this (ms) still counts as the current work when no work item is running */
|
|
7357
7398
|
OWNER_ORIGIN_FRESH_MS: 2 * 60 * 60 * 1000,
|
|
7399
|
+
/**
|
|
7400
|
+
* An owner origin whose request is older than this (ms) is never inherited by
|
|
7401
|
+
* new work, explicit or not (crewly#1357: a delegation carried an owner DM
|
|
7402
|
+
* from nine days earlier). A verbatim `metadata.origin` in the add body is
|
|
7403
|
+
* not an inheritance and is kept as given.
|
|
7404
|
+
*/
|
|
7405
|
+
ORIGIN_INHERIT_MAX_AGE_MS: 2 * 60 * 60 * 1000,
|
|
7406
|
+
/** Tag that opens the message a delegating agent gets with a result for work it handed out */
|
|
7407
|
+
AGENT_RESULT_TAG: '[RESULT]',
|
|
7358
7408
|
/** Max characters of the topic line of a new top-level post */
|
|
7359
7409
|
TOPIC_MAX_CHARS: 120,
|
|
7360
7410
|
/** The one line every prompt carries about where to answer */
|
|
@@ -7370,8 +7420,11 @@ export const OWNER_COMPLETION_REPORT_CONSTANTS = {
|
|
|
7370
7420
|
TICK_MS: 60_000,
|
|
7371
7421
|
/** A chain must stay finished this long before the report is asked for — the lead may still be handing out the next step (ms) */
|
|
7372
7422
|
SETTLE_MS: 5 * 60_000,
|
|
7373
|
-
/**
|
|
7374
|
-
|
|
7423
|
+
/**
|
|
7424
|
+
* After the one nudge, the agent has this long to post its own report before
|
|
7425
|
+
* the harness posts one line for it (ms) (crewly#1357)
|
|
7426
|
+
*/
|
|
7427
|
+
NUDGE_GRACE_MS: 30 * 60_000,
|
|
7375
7428
|
/** Chains whose first item is older than this are never reported (ms) */
|
|
7376
7429
|
MAX_CHAIN_AGE_MS: 14 * 24 * 60 * 60_000,
|
|
7377
7430
|
/** Finished chain records are forgotten after this long (ms) */
|
|
@@ -7382,10 +7435,14 @@ export const OWNER_COMPLETION_REPORT_CONSTANTS = {
|
|
|
7382
7435
|
MAX_TITLES: 5,
|
|
7383
7436
|
/** Max characters of one title in a message */
|
|
7384
7437
|
TITLE_MAX_CHARS: 90,
|
|
7385
|
-
/** Max
|
|
7386
|
-
|
|
7387
|
-
/**
|
|
7388
|
-
|
|
7438
|
+
/** Max characters of one deliverable named in the fallback line */
|
|
7439
|
+
DELIVERABLE_MAX_CHARS: 90,
|
|
7440
|
+
/** Share of CJK characters in the owner's text above which the fallback line is written in Chinese */
|
|
7441
|
+
OWNER_LANGUAGE_CJK_MIN_RATIO: 0.2,
|
|
7442
|
+
/** How far back the owner's recent messages are read to pick the fallback line's language (ms) */
|
|
7443
|
+
OWNER_LANGUAGE_LOOKBACK_MS: 7 * 24 * 60 * 60_000,
|
|
7444
|
+
/** How many recent owner messages are read for that */
|
|
7445
|
+
OWNER_LANGUAGE_SAMPLE: 30,
|
|
7389
7446
|
/** An app comment / relayed owner request stays the agent's current request this long (ms) */
|
|
7390
7447
|
CONTEXT_FRESH_MS: 2 * 60 * 60 * 1000,
|
|
7391
7448
|
/** Max sessions the owner-request context registry remembers */
|
|
@@ -7399,6 +7456,8 @@ export const OWNER_COMPLETION_REPORT_CONSTANTS = {
|
|
|
7399
7456
|
export const TL_DELEGATION_CONSTANTS = {
|
|
7400
7457
|
/** WorkItem.metadata / add-body field: the owner's Slack thread key a delegation answers */
|
|
7401
7458
|
OWNER_THREAD_FIELD: 'ownerThread',
|
|
7459
|
+
/** WorkItem.metadata / add-body field: the owner's chat conversation a delegation answers (crewly#1357) */
|
|
7460
|
+
OWNER_CONVERSATION_FIELD: 'ownerConversation',
|
|
7402
7461
|
/** A done item still lets its agent post in the owner's thread this long (ms) */
|
|
7403
7462
|
DONE_THREAD_GRACE_MS: 60 * 60 * 1000,
|
|
7404
7463
|
/** Claude Code tools that count as hands-on file edits */
|
|
@@ -7684,6 +7743,94 @@ export const TRACE_CONSTANTS = {
|
|
|
7684
7743
|
/** Most ticket labels kept in a trace's tags (specs/2026-10-03-autopilot-experiments.md) */
|
|
7685
7744
|
MAX_TAG_LABELS: 20,
|
|
7686
7745
|
};
|
|
7746
|
+
/**
|
|
7747
|
+
* Stall watcher (crewly#1363, crewly#1362, specs/2026-10-17-stall-watcher.md):
|
|
7748
|
+
* acts on in-flight work that stopped moving — promises to the owner,
|
|
7749
|
+
* claimed WorkItems, and background runs an agent said it started — with
|
|
7750
|
+
* one ladder: the agent once, then its lead once, then one plain line to the
|
|
7751
|
+
* owner. The owner is never the retry loop.
|
|
7752
|
+
*/
|
|
7753
|
+
export const STALL_WATCHER_CONSTANTS = {
|
|
7754
|
+
/** `=false` switches the watcher off entirely */
|
|
7755
|
+
ENV_KILL_SWITCH: 'CREWLY_STALL_WATCHER',
|
|
7756
|
+
/** `=true` / `=false` forces dry run on / off (default: dry run until armed for ARM_DELAY_MS) */
|
|
7757
|
+
ENV_DRY_RUN: 'CREWLY_STALL_WATCHER_DRY_RUN',
|
|
7758
|
+
/** State file under CREWLY_HOME: in-flight runs, ladder stamps, pending claim checks, the armed time */
|
|
7759
|
+
STATE_FILE: 'in-flight-runs.json',
|
|
7760
|
+
/** State file format version */
|
|
7761
|
+
STATE_VERSION: 1,
|
|
7762
|
+
/** How often the watcher looks (ms) */
|
|
7763
|
+
INTERVAL_MS: 5 * 60 * 1000,
|
|
7764
|
+
/** First pass this long after boot, after the boot-pressure gate (ms) */
|
|
7765
|
+
BOOT_DELAY_MS: 3 * 60 * 1000,
|
|
7766
|
+
/**
|
|
7767
|
+
* Like the janitor's retention deletes: the first pass records when it ran
|
|
7768
|
+
* and only logs; the watcher sends nothing until this long after that (ms).
|
|
7769
|
+
*/
|
|
7770
|
+
ARM_DELAY_MS: 24 * 60 * 60 * 1000,
|
|
7771
|
+
/** The agent is re-briefed at this multiple of its own estimate past the promise / run start */
|
|
7772
|
+
AGENT_STEP_MULTIPLIER: 1.5,
|
|
7773
|
+
/** ... but never sooner than this after the promise (ms) */
|
|
7774
|
+
MIN_AGENT_STEP_MS: 20 * 60 * 1000,
|
|
7775
|
+
/** The lead is told at this multiple of the estimate */
|
|
7776
|
+
LEAD_STEP_MULTIPLIER: 3,
|
|
7777
|
+
/** The owner hears one line when the lead has not answered in the thread this long after being told (ms) */
|
|
7778
|
+
LEAD_GRACE_MS: 30 * 60 * 1000,
|
|
7779
|
+
/** At most one watcher nudge per agent per this long (ms) */
|
|
7780
|
+
NUDGE_COOLDOWN_MS: 30 * 60 * 1000,
|
|
7781
|
+
/** At most one owner line per stalled item per this long (ms) */
|
|
7782
|
+
OWNER_LINE_INTERVAL_MS: 24 * 60 * 60 * 1000,
|
|
7783
|
+
/** A background run with no duration in the text is expected back after this long (ms) */
|
|
7784
|
+
RUN_DEFAULT_ESTIMATE_MS: 60 * 60 * 1000,
|
|
7785
|
+
/** An agent with a run in flight is not idle-stopped or evicted until expectedBy + this (ms) */
|
|
7786
|
+
RUN_PROTECTION_GRACE_MS: 30 * 60 * 1000,
|
|
7787
|
+
/** A run record older than this is dropped whatever happened (ms) */
|
|
7788
|
+
RUN_MAX_AGE_MS: 24 * 60 * 60 * 1000,
|
|
7789
|
+
/** Ladder stamps of an item not seen for this long are forgotten (ms) */
|
|
7790
|
+
LADDER_TTL_MS: 7 * 24 * 60 * 60 * 1000,
|
|
7791
|
+
/** Most in-flight runs kept */
|
|
7792
|
+
MAX_RUNS: 200,
|
|
7793
|
+
/** Characters of a run's sentence kept in its record and in nudges */
|
|
7794
|
+
RUN_HEAD_MAX_CHARS: 160,
|
|
7795
|
+
/** Characters of the context message quoted in a promise re-brief */
|
|
7796
|
+
CONTEXT_MAX_CHARS: 300,
|
|
7797
|
+
/** Characters of a promise / title quoted in a nudge or an owner line */
|
|
7798
|
+
QUOTE_MAX_CHARS: 120,
|
|
7799
|
+
/**
|
|
7800
|
+
* A claimed WorkItem whose trace shows no progress (no tool calls, posts
|
|
7801
|
+
* or worktree changes) for this long is stalled; the same again after the
|
|
7802
|
+
* nudge releases the claim (ms). Shares the autonomy-metrics threshold.
|
|
7803
|
+
*/
|
|
7804
|
+
CLAIM_STALL_MS: 30 * 60 * 1000,
|
|
7805
|
+
/** The claim-check window around "X is doing it": a WorkItem / ticket for X created this long before or after (ms) (crewly#1362) */
|
|
7806
|
+
CLAIM_CHECK_WINDOW_MS: 10 * 60 * 1000,
|
|
7807
|
+
/** Most pending claim checks kept */
|
|
7808
|
+
MAX_PENDING_CLAIMS: 200,
|
|
7809
|
+
/** Opens every watcher line to an agent */
|
|
7810
|
+
NUDGE_TAG: '[STALL]',
|
|
7811
|
+
/** Opens a claim-check line to an agent */
|
|
7812
|
+
CLAIM_CHECK_TAG: '[CLAIM-CHECK]',
|
|
7813
|
+
/** Title of the owner's Slack notice */
|
|
7814
|
+
OWNER_ALERT_TITLE: 'Stalled work',
|
|
7815
|
+
/**
|
|
7816
|
+
* An agent saying it started something that runs on its own (a render, a
|
|
7817
|
+
* background process, a sub-agent). Registered only together with a
|
|
7818
|
+
* duration the open-items parser understands ("预计 1 小时左右", "about 40 min").
|
|
7819
|
+
*/
|
|
7820
|
+
BACKGROUND_RUN_PATTERN: /开跑|已经在跑|在跑了|跑起来了|在渲染|渲染中|正在渲染|正在生成|生成中|子任务在做|子\s*agent\s*在(?:做|跑)|后台(?:在)?跑|后台(?:在)?(?:做|生成|渲染)|已经启动|启动了(?:渲染|生成|任务|流程)|\bkicked off\b|\bstarted (?:the|a|another) (?:run|render|job|batch|build|export|background|sub-?agent)\b|\bis rendering\b|\brendering now\b|\brunning in the background\b|\brunning now\b|\blaunched (?:a|the|another) (?:run|render|job|batch|build|sub-?agent)\b|\bspun up (?:a|the) (?:sub-?agent|run|job)\b/iu,
|
|
7821
|
+
/** A later post by the same agent in the thread that reports the run finished or failed */
|
|
7822
|
+
RUN_FINISHED_PATTERN: /跑完|渲染完|生成完|做好了|做完了|完成了|搞定|出来了|好了[,,。!!]|失败|挂了|报错|出错|中断|没跑完|跑崩|\bdone\b|\bfinished\b|\bcompleted\b|\bfailed\b|\bcrashed\b|\berrored\b|\baborted\b|\bready\b|\bhere (?:it|they) (?:is|are)\b|\battached\b/iu,
|
|
7823
|
+
/** A link or a file in a post counts as a deliverable */
|
|
7824
|
+
DELIVERABLE_PATTERN: /https?:\/\/\S+|\S+\.(?:mp4|mov|webm|gif|png|jpe?g|pdf|zip|md|csv|xlsx?|pptx?|docx?|wav|mp3)\b/iu,
|
|
7825
|
+
/** Chinese verbs that make "<Name> …" a claim that the named teammate is doing the work (crewly#1362) */
|
|
7826
|
+
CLAIM_ZH_AFTER_NAME: '(?:已经)?(?:在做|在弄|在处理|在搞|在跟|在推进|在准备|在出|在写|在剪|在录|在改|负责|去做|来做|接了|接手|正在)',
|
|
7827
|
+
/** Chinese verbs that make "… <Name>" a hand-off to the named teammate */
|
|
7828
|
+
CLAIM_ZH_BEFORE_NAME: '(?:交给|让|叫|由|派给|丢给|转给|安排)',
|
|
7829
|
+
/** English verbs after the name: "Pia is (already) doing / on / making / working on it" */
|
|
7830
|
+
CLAIM_EN_AFTER_NAME: "(?:is|'s|has been|will be|was|are|'re)\\s+(?:already\\s+)?(?:doing|on|making|working on|handling|building|taking|taking care of|writing|producing|rendering|editing|cutting|preparing|drafting|looking into|picking (?:it|this) up)",
|
|
7831
|
+
/** English hand-off before the name: "handed it to Pia", "assigned this to Pia" */
|
|
7832
|
+
CLAIM_EN_BEFORE_NAME: '(?:handed|gave|passed|assigned|delegated|sent|routed)\\s+(?:it|this|that|the\\s+\\w+(?:\\s+\\w+)?)\\s+(?:over\\s+)?to',
|
|
7833
|
+
};
|
|
7687
7834
|
/**
|
|
7688
7835
|
* Token usage: the unit, the stats endpoint, and the Codex / Antigravity
|
|
7689
7836
|
* ledgers (specs/2026-10-02-spend-cap.md).
|