@sequenceholdings/studio-cli 0.1.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 +258 -0
- package/dist/artifact/delegate.d.ts +25 -0
- package/dist/artifact/delegate.js +263 -0
- package/dist/atlas-client.d.ts +44 -0
- package/dist/atlas-client.js +173 -0
- package/dist/auth-cmds/commands.d.ts +15 -0
- package/dist/auth-cmds/commands.js +249 -0
- package/dist/auth.d.ts +26 -0
- package/dist/auth.js +171 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +8 -0
- package/dist/cli-errors.d.ts +5 -0
- package/dist/cli-errors.js +78 -0
- package/dist/config.d.ts +44 -0
- package/dist/config.js +103 -0
- package/dist/env-flags.d.ts +8 -0
- package/dist/env-flags.js +47 -0
- package/dist/functions/bundle.d.ts +30 -0
- package/dist/functions/bundle.js +137 -0
- package/dist/functions/commands.d.ts +86 -0
- package/dist/functions/commands.js +999 -0
- package/dist/functions/egress-preview.d.ts +32 -0
- package/dist/functions/egress-preview.js +54 -0
- package/dist/functions/lockfile-origin.d.ts +16 -0
- package/dist/functions/lockfile-origin.js +45 -0
- package/dist/functions/manifest.d.ts +89 -0
- package/dist/functions/manifest.js +586 -0
- package/dist/functions/secret-reconcile.d.ts +79 -0
- package/dist/functions/secret-reconcile.js +86 -0
- package/dist/main.d.ts +14 -0
- package/dist/main.js +129 -0
- package/dist/orm/delegate.d.ts +8 -0
- package/dist/orm/delegate.js +61 -0
- package/dist/pat-hints.d.ts +17 -0
- package/dist/pat-hints.js +28 -0
- package/dist/preview.d.ts +89 -0
- package/dist/preview.js +291 -0
- package/dist/process/agent-loader.d.ts +24 -0
- package/dist/process/agent-loader.js +57 -0
- package/dist/process/build.d.ts +14 -0
- package/dist/process/build.js +368 -0
- package/dist/process/codegen.d.ts +18 -0
- package/dist/process/codegen.js +270 -0
- package/dist/process/commands.d.ts +47 -0
- package/dist/process/commands.js +786 -0
- package/dist/process/discover.d.ts +32 -0
- package/dist/process/discover.js +131 -0
- package/dist/process/lint.d.ts +39 -0
- package/dist/process/lint.js +485 -0
- package/dist/process/local-bundle.d.ts +17 -0
- package/dist/process/local-bundle.js +65 -0
- package/dist/process/plan-diff.d.ts +82 -0
- package/dist/process/plan-diff.js +333 -0
- package/dist/process/resolve-process-pin.d.ts +11 -0
- package/dist/process/resolve-process-pin.js +63 -0
- package/dist/process/simulate.d.ts +50 -0
- package/dist/process/simulate.js +328 -0
- package/dist/prompt.d.ts +35 -0
- package/dist/prompt.js +65 -0
- package/dist/repos/commands.d.ts +49 -0
- package/dist/repos/commands.js +548 -0
- package/dist/repos/git-clone.d.ts +10 -0
- package/dist/repos/git-clone.js +49 -0
- package/dist/secrets/commands.d.ts +24 -0
- package/dist/secrets/commands.js +704 -0
- package/dist/templates/process/example-process/process.ts +43 -0
- package/dist/templates/process/package.json +23 -0
- package/dist/templates/process/pnpm-workspace.yaml +21 -0
- package/dist/templates/process/tsconfig.json +17 -0
- package/package.json +78 -0
- package/templates/process/example-process/process.ts +43 -0
- package/templates/process/package.json +23 -0
- package/templates/process/pnpm-workspace.yaml +21 -0
- package/templates/process/tsconfig.json +17 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineProcess,
|
|
3
|
+
defineNativeAutomationNode,
|
|
4
|
+
defineHumanNode,
|
|
5
|
+
} from '@sequenceholdings/lattice'
|
|
6
|
+
|
|
7
|
+
// Automation nodes run a function registered in the Atlas native-function
|
|
8
|
+
// registry, referenced by id. `health-check` is the built-in reference handler;
|
|
9
|
+
// swap in your own id once you register it under
|
|
10
|
+
// atlas/src/server/lib/lattice/native-functions/functions/.
|
|
11
|
+
const start = defineNativeAutomationNode({
|
|
12
|
+
id: 'start',
|
|
13
|
+
title: 'Start',
|
|
14
|
+
outgoing_edges: [{ id: 'start-to-review', to: 'review' }] as const,
|
|
15
|
+
function: 'health-check',
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const review = defineHumanNode({
|
|
19
|
+
id: 'review',
|
|
20
|
+
title: 'Review',
|
|
21
|
+
outgoing_edges: [
|
|
22
|
+
{ id: 'approve', to: 'done' },
|
|
23
|
+
{ id: 'reject', to: 'done' },
|
|
24
|
+
] as const,
|
|
25
|
+
artifact_refs: [],
|
|
26
|
+
metadata: {},
|
|
27
|
+
timeout: '7d',
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const done = defineNativeAutomationNode({
|
|
31
|
+
id: 'done',
|
|
32
|
+
title: 'Done',
|
|
33
|
+
outgoing_edges: [] as const,
|
|
34
|
+
function: 'health-check',
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
export default defineProcess({
|
|
38
|
+
id: '{{slug}}',
|
|
39
|
+
name: '{{name}}',
|
|
40
|
+
entity: { type: '{{slug}}' },
|
|
41
|
+
start_node_id: 'start',
|
|
42
|
+
nodes: [start, review, done],
|
|
43
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{slug}}-processes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@sequenceholdings/lattice": "^0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@sequenceholdings/studio-cli": "^0.1.0",
|
|
11
|
+
"@types/node": "^22.0.0",
|
|
12
|
+
"typescript": "^5.6.0"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"lint": "seq-studio process lint",
|
|
19
|
+
"plan": "seq-studio process plan",
|
|
20
|
+
"apply": "seq-studio process apply",
|
|
21
|
+
"simulate": "seq-studio process simulate"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Sequence supply-chain guard: require packages to be at least 7 days
|
|
2
|
+
# old before they can be installed. Mirrors the Studio monorepo policy
|
|
3
|
+
# (`pnpm-workspace.yaml` at the root). External process repos
|
|
4
|
+
# scaffolded by `seq-studio process init` inherit the same guard so a
|
|
5
|
+
# freshly-published malicious version of `@sequenceholdings/lattice` (or
|
|
6
|
+
# any transitive dep) is gated out for a week, giving us time to react.
|
|
7
|
+
#
|
|
8
|
+
# 10080 minutes = 7 days. Increase if you want a longer window; do not
|
|
9
|
+
# remove this without security review.
|
|
10
|
+
minimumReleaseAge: 10080
|
|
11
|
+
|
|
12
|
+
# The seq-studio publish chain is exempt: those packages are published
|
|
13
|
+
# from the Studio repo's audited CI pipeline, and consumers shouldn't
|
|
14
|
+
# wait a week to pick up a new seq-studio / lattice release. Scoped to
|
|
15
|
+
# the exact packages (not @sequenceholdings/*) to limit blast radius.
|
|
16
|
+
minimumReleaseAgeExclude:
|
|
17
|
+
- '@sequenceholdings/atlas-ui'
|
|
18
|
+
- '@sequenceholdings/lattice-form-renderer'
|
|
19
|
+
- '@sequenceholdings/artifact-studio'
|
|
20
|
+
- '@sequenceholdings/lattice'
|
|
21
|
+
- '@sequenceholdings/studio-cli'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noUncheckedIndexedAccess": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"verbatimModuleSyntax": false
|
|
15
|
+
},
|
|
16
|
+
"include": ["**/process.ts"]
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sequenceholdings/studio-cli",
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "Unified Sequence Studio CLI — `seq-studio process` (Lattice), `seq-studio artifact` (Artifact Studio), `seq-studio functions` / `secrets`, `seq-studio repos` (platform git-service), and `seq-studio auth pat` (git-service PATs). Reuses ~/.config/sequence-api/tokens.json for Auth0.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/sequenceholdings/studio.git",
|
|
9
|
+
"directory": "shared/services/studio-cli"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"bin": {
|
|
16
|
+
"seq-studio": "./dist/bin.js"
|
|
17
|
+
},
|
|
18
|
+
"main": "./dist/main.js",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/main.d.ts",
|
|
22
|
+
"default": "./dist/main.js"
|
|
23
|
+
},
|
|
24
|
+
"./atlas-client": {
|
|
25
|
+
"types": "./dist/atlas-client.d.ts",
|
|
26
|
+
"default": "./dist/atlas-client.js"
|
|
27
|
+
},
|
|
28
|
+
"./config": {
|
|
29
|
+
"types": "./dist/config.d.ts",
|
|
30
|
+
"default": "./dist/config.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"templates",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"js-yaml": "^4.1.1",
|
|
40
|
+
"smol-toml": "^1.4.2",
|
|
41
|
+
"tsx": "^4.20.3",
|
|
42
|
+
"zod": "^4.1.13",
|
|
43
|
+
"@sequenceholdings/lattice": "0.1.0",
|
|
44
|
+
"@sequenceholdings/artifact-studio": "0.1.9"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@sequenceholdings/orm": "0.1.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"@sequenceholdings/orm": {
|
|
51
|
+
"optional": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/js-yaml": "^4.0.9",
|
|
56
|
+
"@types/node": "^22.0.0",
|
|
57
|
+
"typescript": "^5.6.0",
|
|
58
|
+
"vitest": "^4.1.5",
|
|
59
|
+
"@sequenceholdings/orm": "0.1.0"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=20"
|
|
63
|
+
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"studio",
|
|
66
|
+
"sequence",
|
|
67
|
+
"lattice",
|
|
68
|
+
"process",
|
|
69
|
+
"artifact",
|
|
70
|
+
"cli"
|
|
71
|
+
],
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "rm -rf dist && tsc && node scripts/copy-templates.mjs",
|
|
74
|
+
"type-check": "tsc --noEmit",
|
|
75
|
+
"test": "vitest run",
|
|
76
|
+
"test:watch": "vitest"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineProcess,
|
|
3
|
+
defineNativeAutomationNode,
|
|
4
|
+
defineHumanNode,
|
|
5
|
+
} from '@sequenceholdings/lattice'
|
|
6
|
+
|
|
7
|
+
// Automation nodes run a function registered in the Atlas native-function
|
|
8
|
+
// registry, referenced by id. `health-check` is the built-in reference handler;
|
|
9
|
+
// swap in your own id once you register it under
|
|
10
|
+
// atlas/src/server/lib/lattice/native-functions/functions/.
|
|
11
|
+
const start = defineNativeAutomationNode({
|
|
12
|
+
id: 'start',
|
|
13
|
+
title: 'Start',
|
|
14
|
+
outgoing_edges: [{ id: 'start-to-review', to: 'review' }] as const,
|
|
15
|
+
function: 'health-check',
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const review = defineHumanNode({
|
|
19
|
+
id: 'review',
|
|
20
|
+
title: 'Review',
|
|
21
|
+
outgoing_edges: [
|
|
22
|
+
{ id: 'approve', to: 'done' },
|
|
23
|
+
{ id: 'reject', to: 'done' },
|
|
24
|
+
] as const,
|
|
25
|
+
artifact_refs: [],
|
|
26
|
+
metadata: {},
|
|
27
|
+
timeout: '7d',
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const done = defineNativeAutomationNode({
|
|
31
|
+
id: 'done',
|
|
32
|
+
title: 'Done',
|
|
33
|
+
outgoing_edges: [] as const,
|
|
34
|
+
function: 'health-check',
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
export default defineProcess({
|
|
38
|
+
id: '{{slug}}',
|
|
39
|
+
name: '{{name}}',
|
|
40
|
+
entity: { type: '{{slug}}' },
|
|
41
|
+
start_node_id: 'start',
|
|
42
|
+
nodes: [start, review, done],
|
|
43
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{slug}}-processes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@sequenceholdings/lattice": "^0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@sequenceholdings/studio-cli": "^0.1.0",
|
|
11
|
+
"@types/node": "^22.0.0",
|
|
12
|
+
"typescript": "^5.6.0"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"lint": "seq-studio process lint",
|
|
19
|
+
"plan": "seq-studio process plan",
|
|
20
|
+
"apply": "seq-studio process apply",
|
|
21
|
+
"simulate": "seq-studio process simulate"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Sequence supply-chain guard: require packages to be at least 7 days
|
|
2
|
+
# old before they can be installed. Mirrors the Studio monorepo policy
|
|
3
|
+
# (`pnpm-workspace.yaml` at the root). External process repos
|
|
4
|
+
# scaffolded by `seq-studio process init` inherit the same guard so a
|
|
5
|
+
# freshly-published malicious version of `@sequenceholdings/lattice` (or
|
|
6
|
+
# any transitive dep) is gated out for a week, giving us time to react.
|
|
7
|
+
#
|
|
8
|
+
# 10080 minutes = 7 days. Increase if you want a longer window; do not
|
|
9
|
+
# remove this without security review.
|
|
10
|
+
minimumReleaseAge: 10080
|
|
11
|
+
|
|
12
|
+
# The seq-studio publish chain is exempt: those packages are published
|
|
13
|
+
# from the Studio repo's audited CI pipeline, and consumers shouldn't
|
|
14
|
+
# wait a week to pick up a new seq-studio / lattice release. Scoped to
|
|
15
|
+
# the exact packages (not @sequenceholdings/*) to limit blast radius.
|
|
16
|
+
minimumReleaseAgeExclude:
|
|
17
|
+
- '@sequenceholdings/atlas-ui'
|
|
18
|
+
- '@sequenceholdings/lattice-form-renderer'
|
|
19
|
+
- '@sequenceholdings/artifact-studio'
|
|
20
|
+
- '@sequenceholdings/lattice'
|
|
21
|
+
- '@sequenceholdings/studio-cli'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noUncheckedIndexedAccess": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"verbatimModuleSyntax": false
|
|
15
|
+
},
|
|
16
|
+
"include": ["**/process.ts"]
|
|
17
|
+
}
|