@litfamily/litcodex 1.0.36 → 1.0.38
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-Ko-KR.md +9 -9
- package/README.md +9 -9
- package/dist/install/codex-version.js +1 -1
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-adhd.md +32 -13
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +2 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-board.d.ts +192 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-board.js +437 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.js +17 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.d.ts +3 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.js +6 -4
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.d.ts +9 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.js +245 -30
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +3 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/state-types.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/state-types.js +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.js +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/directive.md +5 -5
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/cli.js +30 -5
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.d.ts +6 -5
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.js +184 -62
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/host-reads.d.ts +7 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/host-reads.js +30 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/index.d.ts +9 -4
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/index.js +5 -2
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/lifecycle-root.d.ts +9 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/lifecycle-root.js +117 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/lifecycle-store.d.ts +72 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/lifecycle-store.js +525 -103
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/pre-tool-hook.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/pre-tool-hook.js +131 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/protected-paths.d.ts +13 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/protected-paths.js +103 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/work-state-reader.d.ts +14 -2
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/work-state-reader.js +14 -4
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/hooks/hooks.json +11 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/SKILL.md +43 -21
- package/marketplace/plugins/litcodex/skills/lit-adhd/agents/openai.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/card-examples.md +103 -3
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/status-taxonomy.md +19 -1
- package/marketplace/plugins/litcodex/skills/start-work/SKILL.md +18 -4
- package/node_modules/@litcodex/lit-loop/directives/lit-adhd.md +32 -13
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +2 -1
- package/node_modules/@litcodex/lit-loop/dist/rewind-board.d.ts +192 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-board.js +437 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-cli.js +17 -3
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.d.ts +3 -2
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.js +6 -4
- package/node_modules/@litcodex/lit-loop/dist/rewind.d.ts +9 -2
- package/node_modules/@litcodex/lit-loop/dist/rewind.js +245 -30
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +3 -3
- package/node_modules/@litcodex/lit-loop/dist/state-types.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/state-types.js +2 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +5 -1
- package/node_modules/@litcodex/lit-loop/dist/workflow-stack.js +1 -1
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/lit-adhd/SKILL.md +43 -21
- package/node_modules/@litcodex/lit-loop/skills/start-work/SKILL.md +18 -4
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
package/marketplace/plugins/litcodex/components/start-work-continuation/dist/lifecycle-store.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ export declare const START_WORK_MAX_STDIN_BYTES = 1000000;
|
|
|
8
8
|
export declare const START_WORK_MAX_HISTORY_EVENTS = 64;
|
|
9
9
|
export declare const START_WORK_MAX_AUTHORITY_BYTES = 64000;
|
|
10
10
|
export declare const START_WORK_MAX_INIT_BYTES = 256000;
|
|
11
|
+
export declare const MAX_PARKED_BOUNDARIES = 16;
|
|
12
|
+
export declare const MAX_DENIED_BOUNDARIES = 64;
|
|
13
|
+
export declare const MAX_CANCEL_NOTICES = 16;
|
|
11
14
|
export type WorkStatus = "active" | "paused" | "abandoned" | "completed";
|
|
12
15
|
export type WorkTransitionAction = "pause" | "resume" | "cancel" | "complete";
|
|
13
16
|
export type WorkReasonCode = "authorization_required" | "credential_required" | "host_capability_required" | "explicit_user_resume" | "user_cancelled" | "completed";
|
|
14
|
-
export type WorkLifecycleKind = "start_work_initialized" | "start_work_continuation_issued" | "start_work_paused" | "start_work_resumed" | "start_work_cancelled" | "start_work_completed";
|
|
17
|
+
export type WorkLifecycleKind = "start_work_initialized" | "start_work_continuation_issued" | "start_work_paused" | "start_work_resumed" | "start_work_cancelled" | "start_work_completed" | "start_work_boundary_parked" | "start_work_boundary_denied";
|
|
15
18
|
export interface AuthorityEnvelope {
|
|
16
19
|
readonly authority_id: string;
|
|
17
20
|
readonly allowed_roots: readonly string[];
|
|
@@ -31,10 +34,23 @@ export interface AuthorityGrant {
|
|
|
31
34
|
readonly action: string;
|
|
32
35
|
readonly root: string;
|
|
33
36
|
}
|
|
37
|
+
export interface ParkedBoundary extends AuthorityBoundary {
|
|
38
|
+
readonly parked_at: string;
|
|
39
|
+
readonly session_id: string;
|
|
40
|
+
readonly transition_id: string;
|
|
41
|
+
}
|
|
42
|
+
export interface CancelNotice {
|
|
43
|
+
readonly work_id: string;
|
|
44
|
+
readonly plan_name: string;
|
|
45
|
+
readonly by_session_id: string;
|
|
46
|
+
readonly at: string;
|
|
47
|
+
}
|
|
34
48
|
export interface ContinuationLease {
|
|
35
49
|
readonly progress_token: string;
|
|
36
50
|
readonly turn_id: string;
|
|
37
51
|
readonly transition_id: string;
|
|
52
|
+
/** Short digest of the parked boundary ids when the lease was issued; absent when nothing was parked. */
|
|
53
|
+
readonly parked_digest?: string;
|
|
38
54
|
}
|
|
39
55
|
export interface WorkLifecycleEvent {
|
|
40
56
|
readonly kind: WorkLifecycleKind;
|
|
@@ -52,6 +68,8 @@ export interface WorkLifecycleEvent {
|
|
|
52
68
|
readonly initFingerprint?: string;
|
|
53
69
|
readonly boundary?: AuthorityBoundary;
|
|
54
70
|
readonly grant?: AuthorityGrant;
|
|
71
|
+
/** The boundaries a typed `lit deny` refused; deny events only. */
|
|
72
|
+
readonly boundaryIds?: readonly string[];
|
|
55
73
|
}
|
|
56
74
|
export interface WorkStateEntry {
|
|
57
75
|
readonly [key: string]: unknown;
|
|
@@ -62,7 +80,10 @@ export interface WorkStateEntry {
|
|
|
62
80
|
readonly status: WorkStatus;
|
|
63
81
|
readonly worktree_path: string | null;
|
|
64
82
|
readonly authority?: AuthorityEnvelope;
|
|
83
|
+
/** Written by older versions only; a schema-3 paused work holding one is read as an active work with it parked. */
|
|
65
84
|
readonly pending_boundary?: AuthorityBoundary;
|
|
85
|
+
readonly parked_boundaries?: readonly ParkedBoundary[];
|
|
86
|
+
readonly denied_boundaries?: readonly AuthorityBoundary[];
|
|
66
87
|
readonly authority_grants?: readonly AuthorityGrant[];
|
|
67
88
|
readonly continuation_lease?: ContinuationLease;
|
|
68
89
|
readonly last_transition?: WorkLifecycleEvent;
|
|
@@ -75,6 +96,7 @@ export interface LifecycleState {
|
|
|
75
96
|
readonly works: Readonly<Record<string, WorkStateEntry>>;
|
|
76
97
|
readonly transition_history?: Readonly<Record<string, WorkLifecycleEvent>>;
|
|
77
98
|
readonly history_floor_revision?: number;
|
|
99
|
+
readonly cancel_notices?: Readonly<Record<string, CancelNotice>>;
|
|
78
100
|
}
|
|
79
101
|
export interface TransitionRequest {
|
|
80
102
|
readonly action: WorkTransitionAction;
|
|
@@ -104,16 +126,40 @@ export interface InitRequest {
|
|
|
104
126
|
};
|
|
105
127
|
}
|
|
106
128
|
export interface StoreOptions {
|
|
129
|
+
/** Supplies HOME and CODEX_HOME for the protected-path and host-read rules; defaults to `process.env`. */
|
|
130
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
107
131
|
readonly now?: () => string;
|
|
108
132
|
readonly nowMs?: () => number;
|
|
109
133
|
readonly afterStateWrite?: () => void;
|
|
110
134
|
readonly onLedgerRead?: (bytes: number, offset: number) => void;
|
|
111
135
|
}
|
|
136
|
+
export type TransitionOutcome = "authorized" | "parked" | "already_parked";
|
|
112
137
|
export interface TransitionResult {
|
|
113
138
|
readonly changed: boolean;
|
|
114
139
|
readonly state: LifecycleState;
|
|
115
140
|
readonly event: WorkLifecycleEvent;
|
|
141
|
+
/** Set for a pause: whether the step was already covered, newly parked, or parked before. */
|
|
142
|
+
readonly outcome?: TransitionOutcome;
|
|
116
143
|
}
|
|
144
|
+
export type CancelResult = {
|
|
145
|
+
readonly outcome: "nothing";
|
|
146
|
+
} | {
|
|
147
|
+
readonly outcome: "replay";
|
|
148
|
+
readonly workId: string;
|
|
149
|
+
readonly plan: string;
|
|
150
|
+
} | {
|
|
151
|
+
readonly outcome: "cancelled";
|
|
152
|
+
readonly workId: string;
|
|
153
|
+
readonly plan: string;
|
|
154
|
+
readonly otherSession: boolean;
|
|
155
|
+
};
|
|
156
|
+
export type DenyResult = {
|
|
157
|
+
readonly outcome: "nothing";
|
|
158
|
+
} | {
|
|
159
|
+
readonly outcome: "denied" | "replay";
|
|
160
|
+
readonly workId: string;
|
|
161
|
+
readonly boundaries: readonly AuthorityBoundary[];
|
|
162
|
+
};
|
|
117
163
|
export type InitResult = TransitionResult;
|
|
118
164
|
export type StopLeaseResult = {
|
|
119
165
|
readonly outcome: "silent";
|
|
@@ -151,6 +197,30 @@ export declare function selectWorkForSession(state: LifecycleState, sessionId: s
|
|
|
151
197
|
export declare function resolveCanonicalPlan(cwd: string, activePlan: string, allowHistoricalAbsolute?: boolean): CanonicalPlan;
|
|
152
198
|
export declare function initializeWork(cwd: string, request: InitRequest, options?: StoreOptions): InitResult;
|
|
153
199
|
export declare function transitionWork(cwd: string, request: TransitionRequest, options?: StoreOptions): TransitionResult;
|
|
200
|
+
/**
|
|
201
|
+
* The typed `lit cancel`: ends the project's nonterminal run whichever Codex session of the project typed it. It
|
|
202
|
+
* checks neither session membership nor an expected revision and never reads the plan, so a deleted or emptied
|
|
203
|
+
* plan cannot keep a user from ending the run. Every other session of the run is left a notice for its next prompt.
|
|
204
|
+
*/
|
|
205
|
+
export declare function cancelWorkFromUserPrompt(cwd: string, request: {
|
|
206
|
+
readonly sessionId: string;
|
|
207
|
+
readonly turnId: string;
|
|
208
|
+
}, options?: StoreOptions): CancelResult;
|
|
209
|
+
/**
|
|
210
|
+
* Remove and return this session's cancel notice. It is bookkeeping, not a lifecycle step: no event is recorded and
|
|
211
|
+
* the revision does not move, so a lane still holding the old revision is not turned away.
|
|
212
|
+
*/
|
|
213
|
+
export declare function takeCancelNotice(cwd: string, sessionId: string, options?: StoreOptions): CancelNotice | null;
|
|
214
|
+
/** The typed `lit deny`: every parked step of this session's run moves to the refused list for the rest of the run. */
|
|
215
|
+
export declare function denyParkedBoundaries(cwd: string, request: {
|
|
216
|
+
readonly sessionId: string;
|
|
217
|
+
readonly turnId: string;
|
|
218
|
+
}, options?: StoreOptions): DenyResult;
|
|
219
|
+
/**
|
|
220
|
+
* Drop a parked step whose root no longer exists, without an event or a revision move. Returns false and changes
|
|
221
|
+
* nothing when the root is still there or the step is not parked for this session.
|
|
222
|
+
*/
|
|
223
|
+
export declare function dropVanishedParkedBoundary(cwd: string, sessionId: string, boundaryId: string, options?: StoreOptions): boolean;
|
|
154
224
|
export declare function advanceStopLease(cwd: string, request: {
|
|
155
225
|
readonly sessionId: string;
|
|
156
226
|
readonly turnId: string;
|
|
@@ -159,3 +229,4 @@ export declare function advanceStopLease(cwd: string, request: {
|
|
|
159
229
|
readonly expectedRevision: number;
|
|
160
230
|
}, options?: StoreOptions): StopLeaseResult;
|
|
161
231
|
export declare function reconcileLifecycleState(cwd: string, options?: StoreOptions): LifecycleState | null;
|
|
232
|
+
export declare function isReleaseClass(action: string): boolean;
|