@lumpcode/cli-types 0.0.6 → 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 +20 -10
- package/dist/index.d.ts +11 -1
- package/package.json +16 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @lumpcode/cli-types
|
|
2
2
|
|
|
3
|
-
TypeScript types and small `defineX` identity helpers for authoring **Lumpcode** lump configuration (`config.js`) and command modules (`.lumpcode/commands/<name>.js`). Runtime is just identity functions; the value is purely the type hints.
|
|
3
|
+
TypeScript types and small `defineX` identity helpers for authoring **Lumpcode** lump configuration (`config.ts` / `config.js`) and command modules (`.lumpcode/commands/<name>.ts` or `.js`). Runtime is just identity functions; the value is purely the type hints.
|
|
4
4
|
|
|
5
|
-
> Use **alongside
|
|
5
|
+
> Use **alongside [@lumpcode/cli](https://www.npmjs.com/package/@lumpcode/cli)** for typed lump config and command modules. Install the CLI with `npm install -g @lumpcode/cli` (Node 22+).
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -12,9 +12,9 @@ npm install --save-dev @lumpcode/cli-types
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
`config.js
|
|
15
|
+
`config.ts` (or `config.js`):
|
|
16
16
|
|
|
17
|
-
```
|
|
17
|
+
```ts
|
|
18
18
|
import { defineConfig } from '@lumpcode/cli-types';
|
|
19
19
|
|
|
20
20
|
export default defineConfig({
|
|
@@ -24,9 +24,9 @@ export default defineConfig({
|
|
|
24
24
|
});
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Command module (`.lumpcode/commands/my-agent.js`):
|
|
27
|
+
Command module (`.lumpcode/commands/my-agent.ts` or `.js`):
|
|
28
28
|
|
|
29
|
-
```
|
|
29
|
+
```ts
|
|
30
30
|
import { defineCommand, defineCommandSetup } from '@lumpcode/cli-types';
|
|
31
31
|
|
|
32
32
|
export const command = defineCommand(({ prompt }) => ({
|
|
@@ -37,14 +37,24 @@ export const command = defineCommand(({ prompt }) => ({
|
|
|
37
37
|
export const setup = defineCommandSetup(async () => ({}));
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
Lumpcode transpiles project **`.ts`** config, hooks, and command modules at load time. Shipped presets under `~/.lumpcode/commands/presets/` remain **`.js` only**.
|
|
41
|
+
|
|
40
42
|
## What's exported
|
|
41
43
|
|
|
42
|
-
- **Config helpers** — `defineConfig`, `defineStep`, hook `define*` helpers for lump `config.js`.
|
|
44
|
+
- **Config helpers** — `defineConfig`, `defineStep`, hook `define*` helpers for lump `config.ts` / `config.js`.
|
|
43
45
|
- **Command-module helpers** — `defineCommandModule`, `defineCommand`, `defineCommandSetup`, `defineCommandTeardown`.
|
|
44
|
-
- **Types** — lump config and command-module shapes, plus engine types re-exported from
|
|
46
|
+
- **Types** — lump config and command-module shapes, plus engine types re-exported from [@lumpcode/core](https://www.npmjs.com/package/@lumpcode/core).
|
|
45
47
|
|
|
46
|
-
Full list: [types.md](
|
|
48
|
+
Full list: [types.md](https://github.com/lumpcode/lumpcode/blob/main/packages/apps/cli/DOCS/types.md).
|
|
47
49
|
|
|
48
50
|
## Docs
|
|
49
51
|
|
|
50
|
-
Field reference and hook signatures live in the CLI docs — see [lump-config.md](
|
|
52
|
+
Field reference and hook signatures live in the CLI docs — see [lump-config.md](https://github.com/lumpcode/lumpcode/blob/main/packages/apps/cli/DOCS/lump-config.md) and [commands.md](https://github.com/lumpcode/lumpcode/blob/main/packages/apps/cli/DOCS/commands.md).
|
|
53
|
+
|
|
54
|
+
## Related packages
|
|
55
|
+
|
|
56
|
+
| Package | npm | Role |
|
|
57
|
+
| ------- | --- | ---- |
|
|
58
|
+
| `@lumpcode/cli` | [npm](https://www.npmjs.com/package/@lumpcode/cli) | CLI: project setup, run, daemon, status |
|
|
59
|
+
| `@lumpcode/core` | [npm](https://www.npmjs.com/package/@lumpcode/core) | Engine API (`runLump`) |
|
|
60
|
+
| `lumpcode` | [npm](https://www.npmjs.com/package/lumpcode) | Unscoped npm alias for `@lumpcode/cli` |
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ type LumpJsConfig<V extends LumpVariables = LumpVariables> = MergeObjs<Omit<{
|
|
|
51
51
|
[K in keyof RunLumpInput<V>]?: NonNullable<RunLumpInput<V>[K]> extends Function ? (RunLumpInput<V>[K] | FilePath) : RunLumpInput<V>[K];
|
|
52
52
|
}, 'gitCommitMessageFn' | 'projectRoot' | 'branchFn' | 'baseBranch' | 'setupWorkspaceFn' | 'teardownWorkspaceFn' | 'gitAddCommandFn' | 'gitCommitCommandFn' | 'gitPushCommandFn'>, {
|
|
53
53
|
baseBranch?: RunLumpInput<V>['baseBranch'];
|
|
54
|
+
/** Which integration line this lump is discovered and scheduled on (defaults to primary branch from local.json). */
|
|
55
|
+
discoveryBranch?: string;
|
|
54
56
|
command?: LumpJsConfigStep['command'];
|
|
55
57
|
contextListJson?: FilePath | Record<string, string>;
|
|
56
58
|
contextMatchFn?: FilePath | ContextMatchFn;
|
|
@@ -129,7 +131,15 @@ type WorkspaceStrategy = 'checkout' | 'worktree';
|
|
|
129
131
|
*/
|
|
130
132
|
interface LocalConfig {
|
|
131
133
|
mode: Mode;
|
|
132
|
-
|
|
134
|
+
/** Required when `primaryBranches` is omitted or empty. Primary integration branch for this install. */
|
|
135
|
+
primaryBranch?: string;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use `primaryBranch` instead.
|
|
138
|
+
* Legacy alias kept for existing `.lumpcode/local.json` files.
|
|
139
|
+
*/
|
|
140
|
+
projectBaseBranch?: string;
|
|
141
|
+
/** When non-empty, wins over singular `primaryBranch` for the effective primary-branch list. Dedicated daemon scans these lines. */
|
|
142
|
+
primaryBranches?: string[];
|
|
133
143
|
workspaceStrategy?: WorkspaceStrategy;
|
|
134
144
|
/** When `true`, the background daemon skips every lump on this machine (`lumpcode start`). */
|
|
135
145
|
disabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumpcode/cli-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Types and defineX helpers for Lumpcode CLI lump config and command modules",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"lumpcode",
|
|
7
|
+
"typescript",
|
|
8
|
+
"types",
|
|
9
|
+
"cli",
|
|
10
|
+
"agent-loop",
|
|
11
|
+
"coding-agent",
|
|
12
|
+
"lump-config"
|
|
13
|
+
],
|
|
5
14
|
"license": "Apache-2.0",
|
|
6
15
|
"author": "",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/lumpcode/lumpcode.git",
|
|
19
|
+
"directory": "packages/apps/cli/cli-types"
|
|
20
|
+
},
|
|
7
21
|
"type": "module",
|
|
8
22
|
"main": "dist/index.cjs",
|
|
9
23
|
"module": "dist/index.js",
|
|
@@ -22,7 +36,7 @@
|
|
|
22
36
|
"build": "rollup -c"
|
|
23
37
|
},
|
|
24
38
|
"dependencies": {
|
|
25
|
-
"@lumpcode/core": "^0.0.
|
|
39
|
+
"@lumpcode/core": "^0.0.9"
|
|
26
40
|
},
|
|
27
41
|
"devDependencies": {
|
|
28
42
|
"@rollup/plugin-commonjs": "^28.0.1",
|