@lumenflow/cli 5.4.0 → 5.7.12
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 +42 -40
- package/dist/db-journal-recover.js +400 -0
- package/dist/db-journal-recover.js.map +1 -0
- package/dist/docs-sync.js +8 -3
- package/dist/docs-sync.js.map +1 -1
- package/dist/gate-defaults.js +191 -9
- package/dist/gate-defaults.js.map +1 -1
- package/dist/gate-registry.js.map +1 -1
- package/dist/gates/monolithic-file-contention-guard.js +167 -0
- package/dist/gates/monolithic-file-contention-guard.js.map +1 -0
- package/dist/gates/prod-migration-drift.js +207 -0
- package/dist/gates/prod-migration-drift.js.map +1 -0
- package/dist/gates/test-over-deletion-guard.js +255 -0
- package/dist/gates/test-over-deletion-guard.js.map +1 -0
- package/dist/gates-runners.js +401 -2
- package/dist/gates-runners.js.map +1 -1
- package/dist/gates.js +349 -4
- package/dist/gates.js.map +1 -1
- package/dist/lumenflow-setup.js +144 -0
- package/dist/lumenflow-setup.js.map +1 -0
- package/dist/lumenflow-upgrade.js +2 -1
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/dist/mem-create.js +10 -1
- package/dist/mem-create.js.map +1 -1
- package/dist/mem-signal.js +21 -4
- package/dist/mem-signal.js.map +1 -1
- package/dist/metrics-cli.js +19 -2
- package/dist/metrics-cli.js.map +1 -1
- package/dist/metrics-snapshot.js +25 -2
- package/dist/metrics-snapshot.js.map +1 -1
- package/dist/orchestrate-initiative.js +28 -3
- package/dist/orchestrate-initiative.js.map +1 -1
- package/dist/public-manifest.js +17 -0
- package/dist/public-manifest.js.map +1 -1
- package/dist/release.js +53 -18
- package/dist/release.js.map +1 -1
- package/dist/wu-done-gates.js +121 -8
- package/dist/wu-done-gates.js.map +1 -1
- package/dist/wu-done.js +30 -6
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-edit-operations.js +74 -0
- package/dist/wu-edit-operations.js.map +1 -1
- package/dist/wu-edit-validators.js +58 -0
- package/dist/wu-edit-validators.js.map +1 -1
- package/dist/wu-edit.js +106 -4
- package/dist/wu-edit.js.map +1 -1
- package/dist/wu-prep.js +132 -8
- package/dist/wu-prep.js.map +1 -1
- package/dist/wu-recover.js +6 -0
- package/dist/wu-recover.js.map +1 -1
- package/dist/wu-release.js +120 -2
- package/dist/wu-release.js.map +1 -1
- package/dist/wu-sizing-validation.js +47 -17
- package/dist/wu-sizing-validation.js.map +1 -1
- package/dist/wu-status.js +33 -0
- package/dist/wu-status.js.map +1 -1
- package/package.json +13 -11
- package/packs/agent-runtime/package.json +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/templates/core/AGENTS.md.template +162 -26
- package/templates/core/LUMENFLOW.md.template +381 -70
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +0 -5
- package/templates/core/ai/onboarding/agent-safety-card.md.template +63 -17
- package/templates/core/ai/onboarding/initiative-orchestration.md.template +4 -0
- package/templates/core/ai/onboarding/release-process.md.template +7 -7
- package/templates/core/ai/onboarding/vendor-support.md.template +74 -10
- package/templates/vendors/claude/.claude/skills/frontend-design/SKILL.md.template +1 -1
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +28 -0
- package/packs/agent-runtime/agent-heartbeat.ts +0 -163
- package/packs/agent-runtime/auto-session-integration.ts +0 -888
- package/packs/agent-runtime/capability-factory.ts +0 -104
- package/packs/agent-runtime/constants.ts +0 -21
- package/packs/agent-runtime/delegation-registry-schema.ts +0 -220
- package/packs/agent-runtime/delegation-registry-store.ts +0 -269
- package/packs/agent-runtime/delegation-tree.ts +0 -328
- package/packs/agent-runtime/index.ts +0 -20
- package/packs/agent-runtime/manifest.ts +0 -348
- package/packs/agent-runtime/memory-coordination-contract.ts +0 -86
- package/packs/agent-runtime/orchestration.ts +0 -2027
- package/packs/agent-runtime/pack-registration.ts +0 -110
- package/packs/agent-runtime/policy-factory.ts +0 -165
- package/packs/agent-runtime/remote-controls/index.ts +0 -7
- package/packs/agent-runtime/remote-controls/operations.ts +0 -405
- package/packs/agent-runtime/remote-controls/port.ts +0 -48
- package/packs/agent-runtime/remote-controls/state-store.ts +0 -258
- package/packs/agent-runtime/remote-controls/types.ts +0 -105
- package/packs/agent-runtime/session-schema.ts +0 -467
- package/packs/agent-runtime/tool-impl/agent-turn-tools.ts +0 -793
- package/packs/agent-runtime/tool-impl/index.ts +0 -6
- package/packs/agent-runtime/tool-impl/provider-adapters.ts +0 -1245
- package/packs/agent-runtime/tool-impl/remote-controls.mock.ts +0 -256
- package/packs/agent-runtime/tool-impl/remote-controls.ts +0 -273
- package/packs/agent-runtime/tools/index.ts +0 -4
- package/packs/agent-runtime/tools/types.ts +0 -47
- package/packs/agent-runtime/turn-lifecycle-events.ts +0 -590
- package/packs/agent-runtime/types.ts +0 -128
- package/packs/agent-runtime/vitest.config.ts +0 -11
- package/packs/sidekick/channel-ingress.ts +0 -137
- package/packs/sidekick/constants.ts +0 -10
- package/packs/sidekick/index.ts +0 -8
- package/packs/sidekick/manifest-schema.ts +0 -49
- package/packs/sidekick/manifest.ts +0 -512
- package/packs/sidekick/pack-registration.ts +0 -110
- package/packs/sidekick/policy-factory.ts +0 -38
- package/packs/sidekick/sidekick-events.ts +0 -694
- package/packs/sidekick/src/adapters/cloud-queue.ts +0 -101
- package/packs/sidekick/src/adapters/control-plane-bridge.adapter.ts +0 -386
- package/packs/sidekick/src/adapters/filesystem-bridge.adapter.ts +0 -228
- package/packs/sidekick/src/domain/channel.types.ts +0 -64
- package/packs/sidekick/src/ports/channel-bridge.port.ts +0 -92
- package/packs/sidekick/src/routines/commit.ts +0 -74
- package/packs/sidekick/tool-impl/channel-tools.ts +0 -577
- package/packs/sidekick/tool-impl/channel-transports.ts +0 -75
- package/packs/sidekick/tool-impl/index.ts +0 -29
- package/packs/sidekick/tool-impl/memory-tools.ts +0 -290
- package/packs/sidekick/tool-impl/routine-commit.ts +0 -102
- package/packs/sidekick/tool-impl/routine-tools.ts +0 -440
- package/packs/sidekick/tool-impl/runtime-context.ts +0 -28
- package/packs/sidekick/tool-impl/shared.ts +0 -125
- package/packs/sidekick/tool-impl/storage.ts +0 -325
- package/packs/sidekick/tool-impl/system-tools.ts +0 -160
- package/packs/sidekick/tool-impl/task-tools.ts +0 -506
- package/packs/sidekick/tools/channel-tools.ts +0 -53
- package/packs/sidekick/tools/index.ts +0 -9
- package/packs/sidekick/tools/memory-tools.ts +0 -53
- package/packs/sidekick/tools/routine-tools.ts +0 -53
- package/packs/sidekick/tools/system-tools.ts +0 -47
- package/packs/sidekick/tools/task-tools.ts +0 -61
- package/packs/sidekick/tools/types.ts +0 -57
- package/packs/sidekick/vitest.config.ts +0 -11
- package/packs/software-delivery/constants.ts +0 -10
- package/packs/software-delivery/extensions.ts +0 -140
- package/packs/software-delivery/gate-policies.ts +0 -134
- package/packs/software-delivery/index.ts +0 -8
- package/packs/software-delivery/manifest-schema.ts +0 -268
- package/packs/software-delivery/manifest.ts +0 -657
- package/packs/software-delivery/pack-registration.ts +0 -113
- package/packs/software-delivery/src/commands/index.ts +0 -5
- package/packs/software-delivery/src/config/delivery-review-contract.ts +0 -256
- package/packs/software-delivery/src/config/env-accessors.ts +0 -66
- package/packs/software-delivery/src/config/index.ts +0 -8
- package/packs/software-delivery/src/config/normalize-config-keys.ts +0 -9
- package/packs/software-delivery/src/config/schemas/lumenflow-config-schema-types.ts +0 -460
- package/packs/software-delivery/src/config/workspace-reader.ts +0 -375
- package/packs/software-delivery/src/constants/backlog-patterns.ts +0 -31
- package/packs/software-delivery/src/constants/client-ids.ts +0 -19
- package/packs/software-delivery/src/constants/config-contract.ts +0 -7
- package/packs/software-delivery/src/constants/docs-layout-presets.ts +0 -50
- package/packs/software-delivery/src/constants/duration-constants.ts +0 -20
- package/packs/software-delivery/src/constants/gate-constants.ts +0 -32
- package/packs/software-delivery/src/constants/index.ts +0 -29
- package/packs/software-delivery/src/constants/lock-constants.ts +0 -35
- package/packs/software-delivery/src/constants/object-guards.ts +0 -12
- package/packs/software-delivery/src/constants/section-headings.ts +0 -107
- package/packs/software-delivery/src/constants/wu-cli-constants.ts +0 -488
- package/packs/software-delivery/src/constants/wu-domain-constants.ts +0 -466
- package/packs/software-delivery/src/constants/wu-git-constants.ts +0 -7
- package/packs/software-delivery/src/constants/wu-id-format.ts +0 -327
- package/packs/software-delivery/src/constants/wu-paths-constants.ts +0 -384
- package/packs/software-delivery/src/constants/wu-statuses.ts +0 -287
- package/packs/software-delivery/src/constants/wu-type-helpers.ts +0 -67
- package/packs/software-delivery/src/constants/wu-ui-constants.ts +0 -267
- package/packs/software-delivery/src/constants/wu-validation-constants.ts +0 -73
- package/packs/software-delivery/src/domain/index.ts +0 -5
- package/packs/software-delivery/src/domain/orchestration.constants.ts +0 -166
- package/packs/software-delivery/src/domain/orchestration.schemas.ts +0 -238
- package/packs/software-delivery/src/domain/orchestration.types.ts +0 -176
- package/packs/software-delivery/src/methodology/incremental-test.ts +0 -122
- package/packs/software-delivery/src/methodology/index.ts +0 -6
- package/packs/software-delivery/src/methodology/manual-test-validator.ts +0 -292
- package/packs/software-delivery/src/policy/coverage-gate.ts +0 -270
- package/packs/software-delivery/src/policy/gates-agent-mode.ts +0 -223
- package/packs/software-delivery/src/policy/gates-config-internal.ts +0 -121
- package/packs/software-delivery/src/policy/gates-config.ts +0 -300
- package/packs/software-delivery/src/policy/gates-coverage.ts +0 -356
- package/packs/software-delivery/src/policy/gates-presets.ts +0 -134
- package/packs/software-delivery/src/policy/gates-schemas.ts +0 -173
- package/packs/software-delivery/src/policy/index.ts +0 -22
- package/packs/software-delivery/src/policy/package-manager-resolver.ts +0 -319
- package/packs/software-delivery/src/policy/resolve-policy.ts +0 -601
- package/packs/software-delivery/src/ports/config.ports.ts +0 -90
- package/packs/software-delivery/src/ports/dashboard-renderer.port.ts +0 -125
- package/packs/software-delivery/src/ports/index.ts +0 -10
- package/packs/software-delivery/src/ports/sync-validator.ports.ts +0 -59
- package/packs/software-delivery/src/ports/wu-helpers.ports.ts +0 -168
- package/packs/software-delivery/src/ports/wu-state.ports.ts +0 -241
- package/packs/software-delivery/src/primitives/index.ts +0 -5
- package/packs/software-delivery/src/runtime/index.ts +0 -6
- package/packs/software-delivery/src/runtime/work-classifier.ts +0 -561
- package/packs/software-delivery/src/sandbox/index.ts +0 -10
- package/packs/software-delivery/src/sandbox/sandbox-allowlist.ts +0 -118
- package/packs/software-delivery/src/sandbox/sandbox-backend-linux.ts +0 -88
- package/packs/software-delivery/src/sandbox/sandbox-backend-macos.ts +0 -154
- package/packs/software-delivery/src/sandbox/sandbox-backend-windows.ts +0 -47
- package/packs/software-delivery/src/sandbox/sandbox-profile.ts +0 -153
- package/packs/software-delivery/src/schemas/index.ts +0 -5
- package/packs/software-delivery/src/state/date-utils.ts +0 -158
- package/packs/software-delivery/src/state/index.ts +0 -15
- package/packs/software-delivery/src/state/state-machine.ts +0 -119
- package/packs/software-delivery/src/state/wu-doc-types.ts +0 -51
- package/packs/software-delivery/src/state/wu-paths.ts +0 -381
- package/packs/software-delivery/src/state/wu-schema.ts +0 -1139
- package/packs/software-delivery/src/state/wu-state-schema.ts +0 -255
- package/packs/software-delivery/src/state/wu-yaml.ts +0 -338
- package/packs/software-delivery/tool-impl/agent-tools.ts +0 -263
- package/packs/software-delivery/tool-impl/delegation-tools.ts +0 -66
- package/packs/software-delivery/tool-impl/flow-metrics-tools.ts +0 -219
- package/packs/software-delivery/tool-impl/git-runner.ts +0 -113
- package/packs/software-delivery/tool-impl/git-tools.ts +0 -316
- package/packs/software-delivery/tool-impl/index.ts +0 -15
- package/packs/software-delivery/tool-impl/initiative-orchestration-tools.ts +0 -720
- package/packs/software-delivery/tool-impl/lane-lock.ts +0 -246
- package/packs/software-delivery/tool-impl/memory-tools.ts +0 -470
- package/packs/software-delivery/tool-impl/pending-runtime-tools.ts +0 -21
- package/packs/software-delivery/tool-impl/runtime-cli-adapter.ts +0 -329
- package/packs/software-delivery/tool-impl/runtime-native-tools.ts +0 -687
- package/packs/software-delivery/tool-impl/worker-loader.ts +0 -52
- package/packs/software-delivery/tool-impl/worktree-tools.ts +0 -46
- package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +0 -807
- package/packs/software-delivery/tools/delegation-tools.ts +0 -23
- package/packs/software-delivery/tools/git-tools.ts +0 -55
- package/packs/software-delivery/tools/index.ts +0 -8
- package/packs/software-delivery/tools/lane-lock-tool.ts +0 -37
- package/packs/software-delivery/tools/types.ts +0 -71
- package/packs/software-delivery/tools/worktree-tools.ts +0 -49
- package/packs/software-delivery/vitest.config.ts +0 -11
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
import { createToolDescriptor, type ToolDescriptor } from './types.js';
|
|
5
|
-
|
|
6
|
-
const STATE_SCOPE = {
|
|
7
|
-
type: 'path' as const,
|
|
8
|
-
pattern: 'runtime/state/**',
|
|
9
|
-
access: 'write' as const,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const delegationRecordTool: ToolDescriptor = createToolDescriptor({
|
|
13
|
-
name: 'delegation:record',
|
|
14
|
-
permission: 'admin',
|
|
15
|
-
required_scopes: [STATE_SCOPE],
|
|
16
|
-
handler: {
|
|
17
|
-
kind: 'subprocess',
|
|
18
|
-
entry: 'tool-impl/delegation-tools.ts#recordDelegationTool',
|
|
19
|
-
},
|
|
20
|
-
description: 'Append delegation lineage events for spawned sub-work.',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const delegationToolCapabilities: readonly ToolDescriptor[] = [delegationRecordTool];
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
import { createToolDescriptor, type ToolDescriptor } from './types.js';
|
|
5
|
-
|
|
6
|
-
const WRITE_SCOPE = {
|
|
7
|
-
type: 'path' as const,
|
|
8
|
-
pattern: '**',
|
|
9
|
-
access: 'write' as const,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const READ_SCOPE = {
|
|
13
|
-
type: 'path' as const,
|
|
14
|
-
pattern: '**',
|
|
15
|
-
access: 'read' as const,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const gitAddTool: ToolDescriptor = createToolDescriptor({
|
|
19
|
-
name: 'git:add',
|
|
20
|
-
permission: 'write',
|
|
21
|
-
required_scopes: [WRITE_SCOPE],
|
|
22
|
-
handler: {
|
|
23
|
-
kind: 'subprocess',
|
|
24
|
-
entry: 'tool-impl/git-tools.ts#gitAddTool',
|
|
25
|
-
},
|
|
26
|
-
description: 'Stage files for commit in a workspace git repository.',
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export const gitStatusTool: ToolDescriptor = createToolDescriptor({
|
|
30
|
-
name: 'git:status',
|
|
31
|
-
permission: 'read',
|
|
32
|
-
required_scopes: [READ_SCOPE],
|
|
33
|
-
handler: {
|
|
34
|
-
kind: 'subprocess',
|
|
35
|
-
entry: 'tool-impl/git-tools.ts#gitStatusTool',
|
|
36
|
-
},
|
|
37
|
-
description: 'Inspect git status in a workspace git repository.',
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const gitCommitTool: ToolDescriptor = createToolDescriptor({
|
|
41
|
-
name: 'git:commit',
|
|
42
|
-
permission: 'write',
|
|
43
|
-
required_scopes: [WRITE_SCOPE],
|
|
44
|
-
handler: {
|
|
45
|
-
kind: 'subprocess',
|
|
46
|
-
entry: 'tool-impl/git-tools.ts#gitCommitTool',
|
|
47
|
-
},
|
|
48
|
-
description: 'Create a commit for staged changes in a workspace git repository.',
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const gitToolCapabilities: readonly ToolDescriptor[] = [
|
|
52
|
-
gitAddTool,
|
|
53
|
-
gitStatusTool,
|
|
54
|
-
gitCommitTool,
|
|
55
|
-
];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
export * from './delegation-tools.js';
|
|
5
|
-
export * from './git-tools.js';
|
|
6
|
-
export * from './lane-lock-tool.js';
|
|
7
|
-
export * from './types.js';
|
|
8
|
-
export * from './worktree-tools.js';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
import { createToolDescriptor, type ToolDescriptor } from './types.js';
|
|
5
|
-
|
|
6
|
-
const ADMIN_SCOPE = {
|
|
7
|
-
type: 'path' as const,
|
|
8
|
-
pattern: 'runtime/locks/**',
|
|
9
|
-
access: 'write' as const,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const laneLockAcquireTool: ToolDescriptor = createToolDescriptor({
|
|
13
|
-
name: 'lane-lock:acquire',
|
|
14
|
-
permission: 'admin',
|
|
15
|
-
required_scopes: [ADMIN_SCOPE],
|
|
16
|
-
handler: {
|
|
17
|
-
kind: 'subprocess',
|
|
18
|
-
entry: 'tool-impl/lane-lock.ts#acquireLaneLockTool',
|
|
19
|
-
},
|
|
20
|
-
description: 'Acquire an atomic lane lock for a work unit.',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const laneLockReleaseTool: ToolDescriptor = createToolDescriptor({
|
|
24
|
-
name: 'lane-lock:release',
|
|
25
|
-
permission: 'admin',
|
|
26
|
-
required_scopes: [ADMIN_SCOPE],
|
|
27
|
-
handler: {
|
|
28
|
-
kind: 'subprocess',
|
|
29
|
-
entry: 'tool-impl/lane-lock.ts#releaseLaneLockTool',
|
|
30
|
-
},
|
|
31
|
-
description: 'Release a lane lock held by the current worker.',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export const laneLockToolCapabilities: readonly ToolDescriptor[] = [
|
|
35
|
-
laneLockAcquireTool,
|
|
36
|
-
laneLockReleaseTool,
|
|
37
|
-
];
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
SOFTWARE_DELIVERY_DOMAIN,
|
|
6
|
-
SOFTWARE_DELIVERY_PACK_ID,
|
|
7
|
-
SOFTWARE_DELIVERY_PACK_VERSION,
|
|
8
|
-
} from '../constants.js';
|
|
9
|
-
|
|
10
|
-
export const TOOL_SCOPE_TYPES = {
|
|
11
|
-
PATH: 'path',
|
|
12
|
-
} as const;
|
|
13
|
-
|
|
14
|
-
export const TOOL_SCOPE_ACCESS = {
|
|
15
|
-
READ: 'read',
|
|
16
|
-
WRITE: 'write',
|
|
17
|
-
} as const;
|
|
18
|
-
|
|
19
|
-
export const TOOL_PERMISSIONS = {
|
|
20
|
-
READ: 'read',
|
|
21
|
-
WRITE: 'write',
|
|
22
|
-
ADMIN: 'admin',
|
|
23
|
-
} as const;
|
|
24
|
-
|
|
25
|
-
export const TOOL_HANDLER_KINDS = {
|
|
26
|
-
SUBPROCESS: 'subprocess',
|
|
27
|
-
} as const;
|
|
28
|
-
|
|
29
|
-
export type ToolScopeType = (typeof TOOL_SCOPE_TYPES)[keyof typeof TOOL_SCOPE_TYPES];
|
|
30
|
-
export type ToolScopeAccess = (typeof TOOL_SCOPE_ACCESS)[keyof typeof TOOL_SCOPE_ACCESS];
|
|
31
|
-
export type ToolPermission = (typeof TOOL_PERMISSIONS)[keyof typeof TOOL_PERMISSIONS];
|
|
32
|
-
export type ToolHandlerKind = (typeof TOOL_HANDLER_KINDS)[keyof typeof TOOL_HANDLER_KINDS];
|
|
33
|
-
|
|
34
|
-
export interface PathScope {
|
|
35
|
-
type: ToolScopeType;
|
|
36
|
-
pattern: string;
|
|
37
|
-
access: ToolScopeAccess;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ToolDescriptor {
|
|
41
|
-
name: string;
|
|
42
|
-
domain: typeof SOFTWARE_DELIVERY_DOMAIN;
|
|
43
|
-
version: typeof SOFTWARE_DELIVERY_PACK_VERSION;
|
|
44
|
-
permission: ToolPermission;
|
|
45
|
-
required_scopes: PathScope[];
|
|
46
|
-
handler: {
|
|
47
|
-
kind: ToolHandlerKind;
|
|
48
|
-
entry: string;
|
|
49
|
-
};
|
|
50
|
-
description: string;
|
|
51
|
-
pack: typeof SOFTWARE_DELIVERY_PACK_ID;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface ToolDescriptorInput {
|
|
55
|
-
name: ToolDescriptor['name'];
|
|
56
|
-
permission: ToolDescriptor['permission'];
|
|
57
|
-
required_scopes: ToolDescriptor['required_scopes'];
|
|
58
|
-
handler: ToolDescriptor['handler'];
|
|
59
|
-
description: ToolDescriptor['description'];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function createToolDescriptor(input: ToolDescriptorInput): ToolDescriptor {
|
|
63
|
-
return {
|
|
64
|
-
...input,
|
|
65
|
-
domain: SOFTWARE_DELIVERY_DOMAIN,
|
|
66
|
-
version: SOFTWARE_DELIVERY_PACK_VERSION,
|
|
67
|
-
pack: SOFTWARE_DELIVERY_PACK_ID,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { SOFTWARE_DELIVERY_DOMAIN, SOFTWARE_DELIVERY_PACK_ID, SOFTWARE_DELIVERY_PACK_VERSION };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
-
// SPDX-License-Identifier: LicenseRef-LumenFlow-Proprietary
|
|
3
|
-
|
|
4
|
-
import { createToolDescriptor, type ToolDescriptor } from './types.js';
|
|
5
|
-
|
|
6
|
-
const WORKTREE_SCOPE = {
|
|
7
|
-
type: 'path' as const,
|
|
8
|
-
pattern: 'worktrees/**',
|
|
9
|
-
access: 'write' as const,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const worktreeListTool: ToolDescriptor = createToolDescriptor({
|
|
13
|
-
name: 'worktree:list',
|
|
14
|
-
permission: 'admin',
|
|
15
|
-
required_scopes: [WORKTREE_SCOPE],
|
|
16
|
-
handler: {
|
|
17
|
-
kind: 'subprocess',
|
|
18
|
-
entry: 'tool-impl/worktree-tools.ts#listWorktreesTool',
|
|
19
|
-
},
|
|
20
|
-
description: 'List available git worktrees.',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const worktreeCreateTool: ToolDescriptor = createToolDescriptor({
|
|
24
|
-
name: 'worktree:create',
|
|
25
|
-
permission: 'admin',
|
|
26
|
-
required_scopes: [WORKTREE_SCOPE],
|
|
27
|
-
handler: {
|
|
28
|
-
kind: 'subprocess',
|
|
29
|
-
entry: 'tool-impl/worktree-tools.ts#createWorktreeTool',
|
|
30
|
-
},
|
|
31
|
-
description: 'Create a git worktree for a delegated unit of work.',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export const worktreeRemoveTool: ToolDescriptor = createToolDescriptor({
|
|
35
|
-
name: 'worktree:remove',
|
|
36
|
-
permission: 'admin',
|
|
37
|
-
required_scopes: [WORKTREE_SCOPE],
|
|
38
|
-
handler: {
|
|
39
|
-
kind: 'subprocess',
|
|
40
|
-
entry: 'tool-impl/worktree-tools.ts#removeWorktreeTool',
|
|
41
|
-
},
|
|
42
|
-
description: 'Remove a git worktree after completion.',
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export const worktreeToolCapabilities: readonly ToolDescriptor[] = [
|
|
46
|
-
worktreeListTool,
|
|
47
|
-
worktreeCreateTool,
|
|
48
|
-
worktreeRemoveTool,
|
|
49
|
-
];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: 'node',
|
|
7
|
-
include: ['__tests__/**/*.test.ts', '**/*.spec.ts'],
|
|
8
|
-
exclude: ['**/node_modules/**', '**/dist/**'],
|
|
9
|
-
passWithNoTests: false,
|
|
10
|
-
},
|
|
11
|
-
});
|