@treeseed/sdk 0.6.7 → 0.6.8
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/dist/copilot.d.ts +15 -0
- package/dist/copilot.js +75 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/managed-dependencies.d.ts +56 -0
- package/dist/managed-dependencies.js +668 -0
- package/dist/operations/providers/default.js +30 -1
- package/dist/operations/services/commit-message-provider.d.ts +33 -0
- package/dist/operations/services/commit-message-provider.js +319 -0
- package/dist/operations/services/config-runtime.js +41 -20
- package/dist/operations/services/git-remote-policy.d.ts +9 -0
- package/dist/operations/services/git-remote-policy.js +55 -0
- package/dist/operations/services/git-workflow.js +22 -3
- package/dist/operations/services/github-api.js +9 -4
- package/dist/operations/services/knowledge-coop-launch.js +4 -0
- package/dist/operations/services/local-dev.js +7 -2
- package/dist/operations/services/package-reference-policy.d.ts +70 -0
- package/dist/operations/services/package-reference-policy.js +314 -0
- package/dist/operations/services/project-platform.d.ts +4 -0
- package/dist/operations/services/project-platform.js +28 -4
- package/dist/operations/services/railway-deploy.d.ts +4 -1
- package/dist/operations/services/railway-deploy.js +76 -38
- package/dist/operations/services/repository-save-orchestrator.d.ts +172 -0
- package/dist/operations/services/repository-save-orchestrator.js +1462 -0
- package/dist/operations/services/workspace-dependency-mode.d.ts +70 -0
- package/dist/operations/services/workspace-dependency-mode.js +404 -0
- package/dist/operations/services/workspace-preflight.js +5 -0
- package/dist/operations/services/workspace-save.js +10 -6
- package/dist/operations-registry.js +5 -0
- package/dist/operations-types.d.ts +1 -0
- package/dist/platform/books-data.js +4 -1
- package/dist/platform/env.yaml +6 -3
- package/dist/reconcile/builtin-adapters.js +37 -7
- package/dist/scripts/cleanup-markdown.js +4 -0
- package/dist/scripts/publish-package.js +5 -0
- package/dist/scripts/tenant-workflow-action.js +11 -2
- package/dist/verification.js +24 -12
- package/dist/workflow/operations.d.ts +381 -55
- package/dist/workflow/operations.js +718 -258
- package/dist/workflow-state.d.ts +40 -1
- package/dist/workflow-state.js +220 -17
- package/dist/workflow-support.d.ts +3 -0
- package/dist/workflow-support.js +34 -0
- package/dist/workflow.d.ts +19 -3
- package/dist/workflow.js +3 -3
- package/dist/wrangler-d1.js +6 -1
- package/package.json +17 -1
- package/templates/github/deploy.workflow.yml +24 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Shared Treeseed SDK for content-backed and D1-backed object models.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"setup:ci": "npm ci",
|
|
35
35
|
"build": "npm run build:dist",
|
|
36
36
|
"build:dist": "node ./scripts/run-ts.mjs ./scripts/build-dist.ts",
|
|
37
|
+
"prepare": "npm run build:dist",
|
|
37
38
|
"prepack": "npm run build:dist",
|
|
38
39
|
"test": "npm run test:unit",
|
|
39
40
|
"test:unit": "vitest run --config ./vitest.config.ts",
|
|
@@ -51,7 +52,12 @@
|
|
|
51
52
|
"release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
55
|
+
"@github/copilot": "1.0.39",
|
|
56
|
+
"@github/copilot-language-server": "1.480.0",
|
|
57
|
+
"@github/copilot-sdk": "0.3.0",
|
|
58
|
+
"@railway/cli": "4.44.0",
|
|
54
59
|
"esbuild": "^0.28.0",
|
|
60
|
+
"extract-zip": "2.0.1",
|
|
55
61
|
"github-slugger": "^2.0.0",
|
|
56
62
|
"ink": "^7.0.0",
|
|
57
63
|
"libsodium-wrappers": "^0.7.15",
|
|
@@ -62,8 +68,10 @@
|
|
|
62
68
|
"remark-mdx": "^3.1.1",
|
|
63
69
|
"remark-parse": "^11.0.0",
|
|
64
70
|
"repomix": "^1.13.1",
|
|
71
|
+
"tar": "7.5.13",
|
|
65
72
|
"typescript": "^5.9.3",
|
|
66
73
|
"unified": "^11.0.5",
|
|
74
|
+
"wrangler": "4.86.0",
|
|
67
75
|
"yaml": "^2.8.1"
|
|
68
76
|
},
|
|
69
77
|
"devDependencies": {
|
|
@@ -188,6 +196,14 @@
|
|
|
188
196
|
"types": "./dist/cli-tools.d.ts",
|
|
189
197
|
"default": "./dist/cli-tools.js"
|
|
190
198
|
},
|
|
199
|
+
"./managed-dependencies": {
|
|
200
|
+
"types": "./dist/managed-dependencies.d.ts",
|
|
201
|
+
"default": "./dist/managed-dependencies.js"
|
|
202
|
+
},
|
|
203
|
+
"./copilot": {
|
|
204
|
+
"types": "./dist/copilot.d.ts",
|
|
205
|
+
"default": "./dist/copilot.js"
|
|
206
|
+
},
|
|
191
207
|
"./types": {
|
|
192
208
|
"types": "./dist/sdk-types.d.ts",
|
|
193
209
|
"default": "./dist/sdk-types.js"
|
|
@@ -139,6 +139,8 @@ jobs:
|
|
|
139
139
|
steps:
|
|
140
140
|
- name: Checkout
|
|
141
141
|
uses: actions/checkout@v4
|
|
142
|
+
with:
|
|
143
|
+
submodules: recursive
|
|
142
144
|
|
|
143
145
|
- name: Setup Node
|
|
144
146
|
uses: actions/setup-node@v4
|
|
@@ -148,7 +150,7 @@ jobs:
|
|
|
148
150
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
149
151
|
|
|
150
152
|
- name: Install dependencies
|
|
151
|
-
run: npm ci
|
|
153
|
+
run: npm ci --ignore-scripts
|
|
152
154
|
|
|
153
155
|
- name: Verify workspace
|
|
154
156
|
shell: bash
|
|
@@ -250,6 +252,8 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
250
252
|
steps:
|
|
251
253
|
- name: Checkout
|
|
252
254
|
uses: actions/checkout@v4
|
|
255
|
+
with:
|
|
256
|
+
submodules: recursive
|
|
253
257
|
|
|
254
258
|
- name: Setup Node
|
|
255
259
|
uses: actions/setup-node@v4
|
|
@@ -259,7 +263,10 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
259
263
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
260
264
|
|
|
261
265
|
- name: Install dependencies
|
|
262
|
-
run: npm ci
|
|
266
|
+
run: npm ci --ignore-scripts
|
|
267
|
+
|
|
268
|
+
- name: Install Railway CLI
|
|
269
|
+
run: npm install -g @railway/cli
|
|
263
270
|
|
|
264
271
|
- name: Provision Treeseed platform
|
|
265
272
|
shell: bash
|
|
@@ -269,7 +276,7 @@ __TENANT_WORKFLOW_ACTION_COMMAND_BLOCK__
|
|
|
269
276
|
- name: Ensure Treeseed deployment state
|
|
270
277
|
shell: bash
|
|
271
278
|
run: |
|
|
272
|
-
node --input-type=module -e "import {
|
|
279
|
+
node --input-type=module -e "import { existsSync, readFileSync, writeFileSync } from 'node:fs'; const scope = process.env.TREESEED_WORKFLOW_ENVIRONMENT || 'staging'; const filePath = '.treeseed/state/environments/' + scope + '/deploy.json'; if (!existsSync(filePath)) { throw new Error('Provision did not write deployment state at ' + filePath); } const state = JSON.parse(readFileSync(filePath, 'utf8')); const dbId = state?.d1Databases?.SITE_DATA_DB?.databaseId; if (!dbId || String(dbId).startsWith('dryrun-')) { throw new Error('Provision deployment state is missing a live D1 database id.'); } const now = new Date().toISOString(); state.target = state.target || { kind: 'persistent', scope }; state.readiness = { ...(state.readiness || {}), initialized: true, configured: true, phase: state.readiness?.phase || 'config_complete', initializedAt: state.readiness?.initializedAt || now, lastValidatedAt: now, blockers: state.readiness?.blockers || [], warnings: state.readiness?.warnings || [] }; writeFileSync(filePath, JSON.stringify(state, null, 2) + '\n');"
|
|
273
280
|
|
|
274
281
|
- name: Upload Treeseed deployment state
|
|
275
282
|
if: always()
|
|
@@ -367,14 +374,7 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
367
374
|
- name: Checkout
|
|
368
375
|
uses: actions/checkout@v4
|
|
369
376
|
with:
|
|
370
|
-
submodules:
|
|
371
|
-
sparse-checkout: |
|
|
372
|
-
/*
|
|
373
|
-
!/src/content/
|
|
374
|
-
!/src/content/**
|
|
375
|
-
!/public/books/
|
|
376
|
-
!/public/books/**
|
|
377
|
-
sparse-checkout-cone-mode: false
|
|
377
|
+
submodules: recursive
|
|
378
378
|
|
|
379
379
|
- name: Setup Node
|
|
380
380
|
uses: actions/setup-node@v4
|
|
@@ -384,7 +384,10 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
384
384
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
385
385
|
|
|
386
386
|
- name: Install dependencies
|
|
387
|
-
run: npm ci
|
|
387
|
+
run: npm ci --ignore-scripts
|
|
388
|
+
|
|
389
|
+
- name: Install Railway CLI
|
|
390
|
+
run: npm install -g @railway/cli
|
|
388
391
|
|
|
389
392
|
- name: Download Treeseed deployment state
|
|
390
393
|
uses: actions/download-artifact@v4
|
|
@@ -483,6 +486,8 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
483
486
|
steps:
|
|
484
487
|
- name: Checkout
|
|
485
488
|
uses: actions/checkout@v4
|
|
489
|
+
with:
|
|
490
|
+
submodules: recursive
|
|
486
491
|
|
|
487
492
|
- name: Setup Node
|
|
488
493
|
uses: actions/setup-node@v4
|
|
@@ -492,7 +497,10 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
492
497
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
493
498
|
|
|
494
499
|
- name: Install dependencies
|
|
495
|
-
run: npm ci
|
|
500
|
+
run: npm ci --ignore-scripts
|
|
501
|
+
|
|
502
|
+
- name: Install Railway CLI
|
|
503
|
+
run: npm install -g @railway/cli
|
|
496
504
|
|
|
497
505
|
- name: Download Treeseed deployment state
|
|
498
506
|
uses: actions/download-artifact@v4
|
|
@@ -571,6 +579,8 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
571
579
|
steps:
|
|
572
580
|
- name: Checkout
|
|
573
581
|
uses: actions/checkout@v4
|
|
582
|
+
with:
|
|
583
|
+
submodules: recursive
|
|
574
584
|
|
|
575
585
|
- name: Setup Node
|
|
576
586
|
uses: actions/setup-node@v4
|
|
@@ -580,7 +590,7 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
580
590
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
581
591
|
|
|
582
592
|
- name: Install dependencies
|
|
583
|
-
run: npm ci
|
|
593
|
+
run: npm ci --ignore-scripts
|
|
584
594
|
|
|
585
595
|
- name: Download Treeseed deployment state
|
|
586
596
|
uses: actions/download-artifact@v4
|