@treeseed/sdk 0.6.6 → 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 +30 -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 +28 -13
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,13 +263,21 @@ __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
|
|
266
273
|
run: |
|
|
267
274
|
__TENANT_WORKFLOW_ACTION_COMMAND_BLOCK__
|
|
268
275
|
|
|
276
|
+
- name: Ensure Treeseed deployment state
|
|
277
|
+
shell: bash
|
|
278
|
+
run: |
|
|
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');"
|
|
280
|
+
|
|
269
281
|
- name: Upload Treeseed deployment state
|
|
270
282
|
if: always()
|
|
271
283
|
uses: actions/upload-artifact@v4
|
|
@@ -362,14 +374,7 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
362
374
|
- name: Checkout
|
|
363
375
|
uses: actions/checkout@v4
|
|
364
376
|
with:
|
|
365
|
-
submodules:
|
|
366
|
-
sparse-checkout: |
|
|
367
|
-
/*
|
|
368
|
-
!/src/content/
|
|
369
|
-
!/src/content/**
|
|
370
|
-
!/public/books/
|
|
371
|
-
!/public/books/**
|
|
372
|
-
sparse-checkout-cone-mode: false
|
|
377
|
+
submodules: recursive
|
|
373
378
|
|
|
374
379
|
- name: Setup Node
|
|
375
380
|
uses: actions/setup-node@v4
|
|
@@ -379,7 +384,10 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
379
384
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
380
385
|
|
|
381
386
|
- name: Install dependencies
|
|
382
|
-
run: npm ci
|
|
387
|
+
run: npm ci --ignore-scripts
|
|
388
|
+
|
|
389
|
+
- name: Install Railway CLI
|
|
390
|
+
run: npm install -g @railway/cli
|
|
383
391
|
|
|
384
392
|
- name: Download Treeseed deployment state
|
|
385
393
|
uses: actions/download-artifact@v4
|
|
@@ -478,6 +486,8 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
478
486
|
steps:
|
|
479
487
|
- name: Checkout
|
|
480
488
|
uses: actions/checkout@v4
|
|
489
|
+
with:
|
|
490
|
+
submodules: recursive
|
|
481
491
|
|
|
482
492
|
- name: Setup Node
|
|
483
493
|
uses: actions/setup-node@v4
|
|
@@ -487,7 +497,10 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
487
497
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
488
498
|
|
|
489
499
|
- name: Install dependencies
|
|
490
|
-
run: npm ci
|
|
500
|
+
run: npm ci --ignore-scripts
|
|
501
|
+
|
|
502
|
+
- name: Install Railway CLI
|
|
503
|
+
run: npm install -g @railway/cli
|
|
491
504
|
|
|
492
505
|
- name: Download Treeseed deployment state
|
|
493
506
|
uses: actions/download-artifact@v4
|
|
@@ -566,6 +579,8 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
566
579
|
steps:
|
|
567
580
|
- name: Checkout
|
|
568
581
|
uses: actions/checkout@v4
|
|
582
|
+
with:
|
|
583
|
+
submodules: recursive
|
|
569
584
|
|
|
570
585
|
- name: Setup Node
|
|
571
586
|
uses: actions/setup-node@v4
|
|
@@ -575,7 +590,7 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
575
590
|
cache-dependency-path: __CACHE_DEPENDENCY_PATH__
|
|
576
591
|
|
|
577
592
|
- name: Install dependencies
|
|
578
|
-
run: npm ci
|
|
593
|
+
run: npm ci --ignore-scripts
|
|
579
594
|
|
|
580
595
|
- name: Download Treeseed deployment state
|
|
581
596
|
uses: actions/download-artifact@v4
|