@lumpcode/core 0.0.7 → 0.0.9
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 +12 -5
- package/dist/helpers/executeStepsForContextList/main.d.ts.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/types/SetupWorkspaceFn.d.ts +4 -0
- package/dist/types/SetupWorkspaceFn.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The core engine of Lumpcode, mainly exporting the `runLump` function.
|
|
|
8
8
|
|
|
9
9
|
`runLump` is very configurable but comes with sensible default behaviors.
|
|
10
10
|
|
|
11
|
-
> **Important:** `@lumpcode/core` is the engine only. For **agent loop campaign** management (project bootstrap, `.lumpcode/lumps/` configs, background daemon, status, and cleanup), use
|
|
11
|
+
> **Important:** `@lumpcode/core` is the engine only. For **agent loop campaign** management (project bootstrap, `.lumpcode/lumps/` configs, background daemon, status, and cleanup), use [@lumpcode/cli](https://www.npmjs.com/package/@lumpcode/cli) (`npm install -g @lumpcode/cli`).
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -79,7 +79,7 @@ interface Context {
|
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
- `**priority**` — Lower values are processed first. Defaults to `0`.
|
|
82
|
-
- `**dependsOnContexts**` — Context names that must be `finished` before this context is eligible. If any dependency is still `toDo` or `branchPushed`, the context is excluded from the current batch. Core resolves each entry marker commit with your `gitCommitMessageFn`.
|
|
82
|
+
- `**dependsOnContexts**` — Context names that must be `finished` before this context is eligible. If any dependency is still `toDo` or `branchPushed`, the context is excluded from the current batch. Core resolves each entry marker commit with your `gitCommitMessageFn`. [@lumpcode/cli](https://www.npmjs.com/package/@lumpcode/cli) can wire **cross-lump** dependencies between lumps in the same project — see [CLI lump config](https://github.com/lumpcode/lumpcode/blob/main/packages/apps/cli/DOCS/lump-config.md#context-ordering-and-cross-lump-dependencies).
|
|
83
83
|
|
|
84
84
|
### CodeBasePath
|
|
85
85
|
|
|
@@ -122,7 +122,7 @@ Elements in the array can also be **functions** that return more `Steps` at runt
|
|
|
122
122
|
|
|
123
123
|
Absolute path to the root of the project Lumpcode will operate on. This directory is scanned to build the list of `CodeBasePath` entries.
|
|
124
124
|
|
|
125
|
-
We recommend pointing `projectRoot` to a **separate copy** of your project rather than the directory you are manually working in, so that Lumpcode's git operations don't interfere with your own work. Where prompts and git commands actually run is determined by `[setupWorkspaceFn](#setupworkspacefn)` (see `workspacePath` there).
|
|
125
|
+
We recommend pointing `projectRoot` to a **separate copy** of your project rather than the directory you are manually working in, so that Lumpcode's git operations don't interfere with your own work. Where prompts and git commands actually run is determined by `[setupWorkspaceFn](#setupworkspacefn)` (see `workspacePath` there). [@lumpcode/cli](https://www.npmjs.com/package/@lumpcode/cli) handles this isolated copy for you.
|
|
126
126
|
|
|
127
127
|
#### `baseBranch`
|
|
128
128
|
|
|
@@ -418,7 +418,7 @@ const steps: Steps = [
|
|
|
418
418
|
|
|
419
419
|
Lumpcode uses normalized git commit messages to record which contexts have already been processed. Each completed context contributes **exactly one commit** whose subject equals `gitCommitMessageFn({ context, ... })`. On every subsequent call to `runLump`, contexts whose normalized commit message is already present on a remote branch are skipped so the run only works on what remains. This lets you call `runLump` repeatedly (e.g. in a cron job) and each invocation picks up where the previous one left off, progressively working through the full context list without ever re-processing a context.
|
|
420
420
|
|
|
421
|
-
> If you'd rather not wire up your own scheduler,
|
|
421
|
+
> If you'd rather not wire up your own scheduler, [@lumpcode/cli](https://www.npmjs.com/package/@lumpcode/cli) ships a built-in daemon (`lumpcode start`) that calls `runLump` on a tick, with concurrent-branch limits and per-lump enable/disable already wired in.
|
|
422
422
|
|
|
423
423
|
### Commit message naming
|
|
424
424
|
|
|
@@ -432,7 +432,7 @@ You can customize this via the `[gitCommitMessageFn](#gitcommitmessagefn)` param
|
|
|
432
432
|
|
|
433
433
|
### Context statuses
|
|
434
434
|
|
|
435
|
-
CLI users: marker format is `LUMP: <lumpName> - <contextName>` — see [concepts.md](
|
|
435
|
+
CLI users: marker format is `LUMP: <lumpName> - <contextName>` — see [concepts.md](https://github.com/lumpcode/lumpcode/blob/main/packages/apps/cli/DOCS/concepts.md).
|
|
436
436
|
|
|
437
437
|
When filtering contexts, Lumpcode resolves each context's normalized commit message to one of three statuses:
|
|
438
438
|
|
|
@@ -512,5 +512,12 @@ flowchart TD
|
|
|
512
512
|
TeardownWorkspace --> Done["Return Success or Failure"]
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
+
## Related packages
|
|
516
|
+
|
|
517
|
+
| Package | npm | Role |
|
|
518
|
+
| ------- | --- | ---- |
|
|
519
|
+
| `@lumpcode/cli` | [npm](https://www.npmjs.com/package/@lumpcode/cli) | CLI: project setup, run, daemon, status |
|
|
520
|
+
| `@lumpcode/cli-types` | [npm](https://www.npmjs.com/package/@lumpcode/cli-types) | Typed `config.ts` / `config.js` and command-module helpers |
|
|
521
|
+
| `lumpcode` | [npm](https://www.npmjs.com/package/lumpcode) | Unscoped npm alias for `@lumpcode/cli` |
|
|
515
522
|
|
|
516
523
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/helpers/executeStepsForContextList/main.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,WAAW,EACX,eAAe,EACf,OAAO,EACP,MAAM,EAIT,MAAM,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,gCAAgC,GAAG,QAAQ,CAAC,IAAI,CACxD,YAAY,EACV,YAAY,GACZ,UAAU,GACV,eAAe,GACf,OAAO,GACP,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,qBAAqB,GACrB,0BAA0B,CAC/B,CAAC,GAAG;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,wBAAsB,0BAA0B,CAAC,EAC7C,UAAU,EACV,QAAQ,EACR,aAAa,EACb,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,MAAM,EAAE,WAAW,GACtB,EAAE,gCAAgC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/helpers/executeStepsForContextList/main.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,WAAW,EACX,eAAe,EACf,OAAO,EACP,MAAM,EAIT,MAAM,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,gCAAgC,GAAG,QAAQ,CAAC,IAAI,CACxD,YAAY,EACV,YAAY,GACZ,UAAU,GACV,eAAe,GACf,OAAO,GACP,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,qBAAqB,GACrB,0BAA0B,CAC/B,CAAC,GAAG;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,wBAAsB,0BAA0B,CAAC,EAC7C,UAAU,EACV,QAAQ,EACR,aAAa,EACb,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,MAAM,EAAE,WAAW,GACtB,EAAE,gCAAgC;aAqEa,MAAM;;;;;IAmOrD;AAED,MAAM,MAAM,gCAAgC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -3453,7 +3453,7 @@ async function executeStepsForContextList({ baseBranch, branchFn, lumpVariables,
|
|
|
3453
3453
|
contextList,
|
|
3454
3454
|
workspacePath: '.',
|
|
3455
3455
|
};
|
|
3456
|
-
const { command: setupWorkspaceCommand, workspacePath } = await setupWorkspaceFn(injectedGitAndWorkspaceFnsInput);
|
|
3456
|
+
const { command: setupWorkspaceCommand, workspacePath, afterExec } = await setupWorkspaceFn(injectedGitAndWorkspaceFnsInput);
|
|
3457
3457
|
logger.verbose(`setupWorkspaceCommand ${setupWorkspaceCommand}`);
|
|
3458
3458
|
logger.verbose(`workspacePath ${workspacePath}`);
|
|
3459
3459
|
if (setupWorkspaceCommand) {
|
|
@@ -3464,6 +3464,9 @@ async function executeStepsForContextList({ baseBranch, branchFn, lumpVariables,
|
|
|
3464
3464
|
if (!setupWorkspaceCommandExec.success) {
|
|
3465
3465
|
return set(setupWorkspaceCommandExec, ['data', 'message'], `Failed to setup the workspace: ${setupWorkspaceCommandExec.data.message}`);
|
|
3466
3466
|
}
|
|
3467
|
+
if (afterExec) {
|
|
3468
|
+
await afterExec({ workspacePath });
|
|
3469
|
+
}
|
|
3467
3470
|
}
|
|
3468
3471
|
const gitStatusCommand = await execAsync(`git status`, { cwd: workspacePath });
|
|
3469
3472
|
logger.verbose(`gitStatusCommand ${JSON.stringify(gitStatusCommand.data)}`);
|