@treeseed/sdk 0.4.13 → 0.5.0
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/control-plane-client.d.ts +60 -1
- package/dist/control-plane-client.js +59 -0
- package/dist/control-plane.d.ts +1 -1
- package/dist/control-plane.js +11 -4
- package/dist/d1-store.d.ts +58 -0
- package/dist/d1-store.js +64 -0
- package/dist/dispatch.js +6 -0
- package/dist/graph/schema.js +4 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +32 -0
- package/dist/knowledge-coop.d.ts +223 -0
- package/dist/knowledge-coop.js +82 -0
- package/dist/model-registry.js +79 -0
- package/dist/operations/providers/default.js +126 -7
- package/dist/operations/services/config-runtime.d.ts +102 -24
- package/dist/operations/services/config-runtime.js +896 -160
- package/dist/operations/services/deploy.d.ts +223 -15
- package/dist/operations/services/deploy.js +626 -55
- package/dist/operations/services/github-automation.d.ts +60 -0
- package/dist/operations/services/github-automation.js +138 -0
- package/dist/operations/services/key-agent.d.ts +118 -0
- package/dist/operations/services/key-agent.js +476 -0
- package/dist/operations/services/knowledge-coop-launch.d.ts +90 -0
- package/dist/operations/services/knowledge-coop-launch.js +753 -0
- package/dist/operations/services/knowledge-coop-packaging.d.ts +59 -0
- package/dist/operations/services/knowledge-coop-packaging.js +234 -0
- package/dist/operations/services/local-dev.d.ts +0 -1
- package/dist/operations/services/local-dev.js +1 -14
- package/dist/operations/services/project-platform.d.ts +42 -182
- package/dist/operations/services/project-platform.js +162 -59
- package/dist/operations/services/railway-deploy.d.ts +1 -0
- package/dist/operations/services/railway-deploy.js +31 -13
- package/dist/operations/services/runtime-tools.d.ts +52 -5
- package/dist/operations/services/runtime-tools.js +186 -26
- package/dist/operations/services/watch-dev.js +2 -4
- package/dist/operations/services/workspace-preflight.d.ts +4 -4
- package/dist/operations/services/workspace-preflight.js +22 -20
- package/dist/operations-registry.js +7 -2
- package/dist/platform/contracts.d.ts +39 -3
- package/dist/platform/deploy-config.d.ts +12 -1
- package/dist/platform/deploy-config.js +214 -15
- package/dist/platform/deploy-runtime.d.ts +1 -0
- package/dist/platform/deploy-runtime.js +10 -2
- package/dist/platform/env.yaml +93 -61
- package/dist/platform/environment.d.ts +13 -2
- package/dist/platform/environment.js +90 -20
- package/dist/platform/plugins/constants.d.ts +1 -0
- package/dist/platform/plugins/constants.js +7 -6
- package/dist/platform/tenant/runtime-config.js +8 -1
- package/dist/platform/tenant-config.js +4 -0
- package/dist/platform/utils/site-config-schema.js +18 -0
- package/dist/plugin-default.js +2 -2
- package/dist/scripts/key-agent.js +165 -0
- package/dist/scripts/tenant-build.js +4 -1
- package/dist/scripts/tenant-check.js +4 -1
- package/dist/scripts/tenant-deploy.js +43 -4
- package/dist/scripts/tenant-dev.js +0 -1
- package/dist/sdk-types.d.ts +2 -2
- package/dist/sdk-types.js +2 -0
- package/dist/sdk.d.ts +13 -0
- package/dist/sdk.js +40 -0
- package/dist/stores/knowledge-coop-store.d.ts +56 -0
- package/dist/stores/knowledge-coop-store.js +482 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +6 -2
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/api/server.js +4 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +25 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/decisions/adopt-initial-proposal-loop.mdx +22 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/people/starter-steward.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/proposals/establish-initial-proposal-loop.mdx +17 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +17 -10
- package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +69 -7
- package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +1 -0
- package/dist/workflow/operations.d.ts +98 -0
- package/dist/workflow/operations.js +229 -7
- package/dist/workflow-state.d.ts +54 -2
- package/dist/workflow-state.js +170 -24
- package/dist/workflow-support.d.ts +1 -1
- package/dist/workflow-support.js +32 -2
- package/dist/workflow.d.ts +29 -0
- package/package.json +1 -1
- package/templates/github/deploy.workflow.yml +11 -1
- package/dist/scripts/sync-dev-vars.js +0 -6
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import type { RemoteTreeseedConfig } from '../../remote.ts';
|
|
2
|
-
import { TREESEED_ENVIRONMENT_SCOPES, validateTreeseedEnvironmentValues } from '../../platform/environment.ts';
|
|
2
|
+
import { TREESEED_ENVIRONMENT_SCOPES, type TreeseedEnvironmentValidation, validateTreeseedEnvironmentValues } from '../../platform/environment.ts';
|
|
3
|
+
import { type TreeseedKeyAgentStatus } from './key-agent.ts';
|
|
4
|
+
export { TREESEED_MACHINE_KEY_PASSPHRASE_ENV, TreeseedKeyAgentError } from './key-agent.ts';
|
|
3
5
|
export declare const DEFAULT_TREESEED_API_BASE_URL = "https://api.treeseed.ai";
|
|
4
6
|
export declare const DEFAULT_TEMPLATE_CATALOG_URL = "https://api.treeseed.ai/search/templates";
|
|
5
7
|
export declare const TREESEED_TEMPLATE_CATALOG_URL_ENV = "TREESEED_TEMPLATE_CATALOG_URL";
|
|
6
8
|
export declare const TREESEED_API_BASE_URL_ENV = "TREESEED_API_BASE_URL";
|
|
9
|
+
export declare function listDeprecatedTreeseedLocalEnvFiles(tenantRoot: any): string[];
|
|
10
|
+
export declare function warnDeprecatedTreeseedLocalEnvFiles(tenantRoot: any, write?: (line: string) => void): string[];
|
|
7
11
|
export declare function getTreeseedMachineConfigPaths(tenantRoot: any): {
|
|
8
12
|
configPath: string;
|
|
9
13
|
authPath: string;
|
|
10
14
|
keyPath: string;
|
|
11
15
|
legacyKeyPath: string;
|
|
12
16
|
};
|
|
17
|
+
export declare function withTreeseedKeyAgentAutopromptDisabled<T>(action: () => T): T;
|
|
18
|
+
export declare function inspectTreeseedKeyAgentStatus(tenantRoot: any): TreeseedKeyAgentStatus;
|
|
19
|
+
export declare function unlockTreeseedSecretSessionInteractive(tenantRoot: any): any;
|
|
20
|
+
export declare function unlockTreeseedSecretSessionFromEnv(tenantRoot: any, options?: {}): any;
|
|
21
|
+
export declare function unlockTreeseedSecretSessionWithPassphrase(tenantRoot: any, passphrase: any, options?: {}): any;
|
|
22
|
+
export declare function ensureTreeseedSecretSessionForConfig({ tenantRoot, interactive, env, createIfMissing, allowMigration, promptForPassphrase, promptForNewPassphrase, }: {
|
|
23
|
+
tenantRoot: string;
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
createIfMissing?: boolean;
|
|
27
|
+
allowMigration?: boolean;
|
|
28
|
+
promptForPassphrase?: () => Promise<string> | string;
|
|
29
|
+
promptForNewPassphrase?: () => Promise<string> | string;
|
|
30
|
+
}): Promise<TreeseedConfigSecretSessionBootstrap>;
|
|
31
|
+
export declare function lockTreeseedSecretSession(tenantRoot: any): any;
|
|
13
32
|
export declare function getTreeseedRemoteAuthPaths(tenantRoot: any): {
|
|
14
33
|
authPath: string;
|
|
15
34
|
};
|
|
@@ -18,12 +37,16 @@ export type TreeseedConfigEntrySnapshot = {
|
|
|
18
37
|
id: string;
|
|
19
38
|
label: string;
|
|
20
39
|
group: string;
|
|
40
|
+
cluster: string;
|
|
41
|
+
startupProfile: 'core' | 'optional' | 'advanced';
|
|
42
|
+
requirement: 'required' | 'conditional' | 'optional';
|
|
21
43
|
description: string;
|
|
22
44
|
howToGet: string;
|
|
23
45
|
sensitivity: 'secret' | 'plain' | 'derived';
|
|
24
46
|
targets: string[];
|
|
25
47
|
purposes: string[];
|
|
26
48
|
storage: 'shared' | 'scoped';
|
|
49
|
+
validation?: TreeseedEnvironmentValidation;
|
|
27
50
|
scope: TreeseedConfigScope;
|
|
28
51
|
sharedScopes: TreeseedConfigScope[];
|
|
29
52
|
required: boolean;
|
|
@@ -44,16 +67,30 @@ export type TreeseedCollectedConfigContext = {
|
|
|
44
67
|
entriesByScope: Record<TreeseedConfigScope, TreeseedConfigEntrySnapshot[]>;
|
|
45
68
|
valuesByScope: Record<TreeseedConfigScope, Record<string, string>>;
|
|
46
69
|
suggestedValuesByScope: Record<TreeseedConfigScope, Record<string, string>>;
|
|
47
|
-
|
|
70
|
+
configReadinessByScope: Record<TreeseedConfigScope, ReturnType<typeof createConfigReadiness>>;
|
|
48
71
|
validationByScope: Record<TreeseedConfigScope, ReturnType<typeof validateTreeseedEnvironmentValues>>;
|
|
72
|
+
sharedStorageMigrations: TreeseedSharedStorageMigrationNotice[];
|
|
49
73
|
registry: ReturnType<typeof collectTreeseedEnvironmentContext>;
|
|
50
74
|
};
|
|
75
|
+
export type TreeseedConfigSecretSessionBootstrap = {
|
|
76
|
+
status: TreeseedKeyAgentStatus;
|
|
77
|
+
createdWrappedKey: boolean;
|
|
78
|
+
migratedWrappedKey: boolean;
|
|
79
|
+
unlockSource: 'interactive' | 'env' | 'existing-session';
|
|
80
|
+
};
|
|
51
81
|
export type TreeseedConfigValueUpdate = {
|
|
52
82
|
scope: TreeseedConfigScope;
|
|
53
83
|
entryId: string;
|
|
54
84
|
value: string;
|
|
55
85
|
reused?: boolean;
|
|
56
86
|
};
|
|
87
|
+
export type TreeseedSharedStorageMigrationNotice = {
|
|
88
|
+
entryId: string;
|
|
89
|
+
label: string;
|
|
90
|
+
promotedFrom: TreeseedConfigScope;
|
|
91
|
+
consolidatedScopes: TreeseedConfigScope[];
|
|
92
|
+
hadConflicts: boolean;
|
|
93
|
+
};
|
|
57
94
|
export declare function createDefaultTreeseedMachineConfig({ tenantRoot, deployConfig, tenantConfig }: {
|
|
58
95
|
tenantRoot: any;
|
|
59
96
|
deployConfig: any;
|
|
@@ -92,8 +129,6 @@ export declare function createDefaultTreeseedMachineConfig({ tenantRoot, deployC
|
|
|
92
129
|
projectName: string;
|
|
93
130
|
apiServiceId: string;
|
|
94
131
|
apiServiceName: string;
|
|
95
|
-
agentsServiceId: string;
|
|
96
|
-
agentsServiceName: string;
|
|
97
132
|
};
|
|
98
133
|
};
|
|
99
134
|
};
|
|
@@ -112,6 +147,15 @@ export declare function rotateTreeseedMachineKey(tenantRoot: any): {
|
|
|
112
147
|
keyPath: string;
|
|
113
148
|
rotated: boolean;
|
|
114
149
|
};
|
|
150
|
+
export declare function rotateTreeseedMachineKeyPassphrase(tenantRoot: any, passphrase: any): {
|
|
151
|
+
keyPath: string;
|
|
152
|
+
rotated: boolean;
|
|
153
|
+
};
|
|
154
|
+
export declare function migrateTreeseedMachineKeyToWrapped(tenantRoot: any, passphrase: any): {
|
|
155
|
+
keyPath: string;
|
|
156
|
+
migrated: boolean;
|
|
157
|
+
alreadyWrapped: boolean;
|
|
158
|
+
};
|
|
115
159
|
export declare function loadTreeseedRemoteAuthState(tenantRoot: any): {
|
|
116
160
|
version: number;
|
|
117
161
|
sessions: {
|
|
@@ -155,6 +199,7 @@ export declare function resolveTreeseedRemoteSession(tenantRoot: any, hostId: an
|
|
|
155
199
|
} | null;
|
|
156
200
|
export declare function loadTreeseedMachineConfig(tenantRoot: any): any;
|
|
157
201
|
export declare function writeTreeseedMachineConfig(tenantRoot: any, config: any): void;
|
|
202
|
+
export declare function updateTreeseedDeployConfigFeatureToggles(tenantRoot: string, toggles: Partial<Record<'turnstile' | 'smtp', boolean>>): void;
|
|
158
203
|
export declare function resolveTreeseedRemoteConfig(startRoot?: string, env?: NodeJS.ProcessEnv): RemoteTreeseedConfig;
|
|
159
204
|
export declare function resolveTreeseedTemplateCatalogEndpoint(startRoot?: string, env?: NodeJS.ProcessEnv): string;
|
|
160
205
|
export declare function resolveTreeseedTemplateCatalogCachePath(startRoot?: string): string;
|
|
@@ -167,7 +212,13 @@ export declare function applyTreeseedSafeRepairs(tenantRoot: string): TreeseedRe
|
|
|
167
212
|
export declare function resolveTreeseedMachineEnvironmentValues(tenantRoot: any, scope: any): {};
|
|
168
213
|
export declare function setTreeseedMachineEnvironmentValue(tenantRoot: any, scope: any, entry: any, value: any): any;
|
|
169
214
|
export declare function collectTreeseedEnvironmentContext(tenantRoot: any): import("../../platform/environment.ts").TreeseedResolvedEnvironmentRegistry;
|
|
170
|
-
export declare function collectTreeseedConfigSeedValues(tenantRoot: any, scope: any, env?: NodeJS.ProcessEnv):
|
|
215
|
+
export declare function collectTreeseedConfigSeedValues(tenantRoot: any, scope: any, env?: NodeJS.ProcessEnv): {};
|
|
216
|
+
export declare function resolveTreeseedLaunchEnvironment({ tenantRoot, scope, baseEnv, overrides, }: {
|
|
217
|
+
tenantRoot: string;
|
|
218
|
+
scope: TreeseedConfigScope;
|
|
219
|
+
baseEnv?: NodeJS.ProcessEnv;
|
|
220
|
+
overrides?: NodeJS.ProcessEnv;
|
|
221
|
+
}): {};
|
|
171
222
|
export declare function formatTreeseedConfigEnvironmentReport({ tenantRoot, scope, env, revealSecrets }: {
|
|
172
223
|
tenantRoot: any;
|
|
173
224
|
scope: any;
|
|
@@ -197,10 +248,6 @@ export declare function assertTreeseedCommandEnvironment({ tenantRoot, scope, pu
|
|
|
197
248
|
values: {};
|
|
198
249
|
validation: import("../../platform/environment.ts").TreeseedEnvironmentValidationResult;
|
|
199
250
|
};
|
|
200
|
-
export declare function writeTreeseedLocalEnvironmentFiles(tenantRoot: any): {
|
|
201
|
-
envLocalPath: string;
|
|
202
|
-
devVarsPath: string;
|
|
203
|
-
};
|
|
204
251
|
export declare function ensureTreeseedActVerificationTooling({ tenantRoot, installIfMissing, env, write }?: {
|
|
205
252
|
tenantRoot?: string | undefined;
|
|
206
253
|
installIfMissing?: boolean | undefined;
|
|
@@ -221,6 +268,16 @@ export declare function ensureTreeseedActVerificationTooling({ tenantRoot, insta
|
|
|
221
268
|
available: any;
|
|
222
269
|
detail: any;
|
|
223
270
|
};
|
|
271
|
+
wranglerCli: {
|
|
272
|
+
name: any;
|
|
273
|
+
available: any;
|
|
274
|
+
detail: any;
|
|
275
|
+
};
|
|
276
|
+
railwayCli: {
|
|
277
|
+
name: any;
|
|
278
|
+
available: any;
|
|
279
|
+
detail: any;
|
|
280
|
+
};
|
|
224
281
|
actVerificationReady: any;
|
|
225
282
|
remediation: string[];
|
|
226
283
|
};
|
|
@@ -235,6 +292,7 @@ export declare function checkTreeseedProviderConnections({ tenantRoot, scope, en
|
|
|
235
292
|
ready: any;
|
|
236
293
|
detail: any;
|
|
237
294
|
}[];
|
|
295
|
+
issues: any[];
|
|
238
296
|
};
|
|
239
297
|
export declare function formatTreeseedProviderConnectionReport(report: any): string;
|
|
240
298
|
export declare function syncTreeseedGitHubEnvironment({ tenantRoot, scope, dryRun }?: {
|
|
@@ -297,33 +355,53 @@ export declare function initializeTreeseedPersistentEnvironment({ tenantRoot, sc
|
|
|
297
355
|
siteDataDb: any;
|
|
298
356
|
queue: any;
|
|
299
357
|
content: any;
|
|
358
|
+
webCache: {
|
|
359
|
+
webHost: any;
|
|
360
|
+
contentHost: any;
|
|
361
|
+
rulesManaged: boolean;
|
|
362
|
+
lastSyncedAt: any;
|
|
363
|
+
lastError: any;
|
|
364
|
+
policy: {
|
|
365
|
+
sourcePages: {
|
|
366
|
+
paths: string[];
|
|
367
|
+
browserTtlSeconds: number;
|
|
368
|
+
edgeTtlSeconds: number;
|
|
369
|
+
staleWhileRevalidateSeconds: number;
|
|
370
|
+
staleIfErrorSeconds: number;
|
|
371
|
+
};
|
|
372
|
+
contentPages: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
373
|
+
r2PublishedObjects: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
374
|
+
};
|
|
375
|
+
deployPurge: any;
|
|
376
|
+
contentPurge: any;
|
|
377
|
+
};
|
|
300
378
|
};
|
|
301
379
|
secrets: string[];
|
|
302
380
|
};
|
|
303
|
-
declare function
|
|
304
|
-
|
|
305
|
-
|
|
381
|
+
declare function createConfigReadiness(values: any, validation: any): {
|
|
382
|
+
github: {
|
|
383
|
+
configured: boolean;
|
|
306
384
|
};
|
|
307
|
-
|
|
308
|
-
|
|
385
|
+
cloudflare: {
|
|
386
|
+
configured: boolean;
|
|
309
387
|
};
|
|
310
388
|
railway: {
|
|
311
|
-
|
|
389
|
+
configured: boolean;
|
|
312
390
|
};
|
|
313
|
-
|
|
391
|
+
localDevelopment: {
|
|
314
392
|
configured: boolean;
|
|
315
393
|
};
|
|
316
394
|
};
|
|
395
|
+
export declare function configGroupRank(group: any): number;
|
|
317
396
|
export declare function listRelevantTreeseedConfigEntries(registry: any, scope: TreeseedConfigScope): any;
|
|
318
397
|
export declare function collectTreeseedConfigContext({ tenantRoot, scopes, env, }: {
|
|
319
398
|
tenantRoot: string;
|
|
320
399
|
scopes?: TreeseedConfigScope[];
|
|
321
400
|
env?: NodeJS.ProcessEnv;
|
|
322
401
|
}): TreeseedCollectedConfigContext;
|
|
323
|
-
export declare function applyTreeseedConfigValues({ tenantRoot, updates,
|
|
402
|
+
export declare function applyTreeseedConfigValues({ tenantRoot, updates, applyLocalEnvironment, }: {
|
|
324
403
|
tenantRoot: string;
|
|
325
404
|
updates: TreeseedConfigValueUpdate[];
|
|
326
|
-
writeLocalFiles?: boolean;
|
|
327
405
|
applyLocalEnvironment?: boolean;
|
|
328
406
|
}): {
|
|
329
407
|
updated: {
|
|
@@ -332,18 +410,16 @@ export declare function applyTreeseedConfigValues({ tenantRoot, updates, writeLo
|
|
|
332
410
|
reused: boolean;
|
|
333
411
|
cleared: boolean;
|
|
334
412
|
}[];
|
|
335
|
-
|
|
336
|
-
envLocalPath: string;
|
|
337
|
-
devVarsPath: string;
|
|
338
|
-
} | null;
|
|
413
|
+
sharedStorageMigrations: TreeseedSharedStorageMigrationNotice[];
|
|
339
414
|
};
|
|
340
|
-
export declare function finalizeTreeseedConfig({ tenantRoot, scopes, sync, env, checkConnections, initializePersistent, }: {
|
|
415
|
+
export declare function finalizeTreeseedConfig({ tenantRoot, scopes, sync, env, checkConnections, initializePersistent, onProgress, }: {
|
|
341
416
|
tenantRoot: string;
|
|
342
417
|
scopes?: TreeseedConfigScope[];
|
|
343
418
|
sync?: 'none' | 'github' | 'cloudflare' | 'railway' | 'all';
|
|
344
419
|
env?: NodeJS.ProcessEnv;
|
|
345
420
|
checkConnections?: boolean;
|
|
346
421
|
initializePersistent?: boolean;
|
|
422
|
+
onProgress?: (message: string) => void;
|
|
347
423
|
}): {
|
|
348
424
|
scopes: ("local" | "staging" | "prod")[];
|
|
349
425
|
synced: Record<string, unknown>;
|
|
@@ -355,9 +431,12 @@ export declare function finalizeTreeseedConfig({ tenantRoot, scopes, sync, env,
|
|
|
355
431
|
connectionChecks: ReturnType<typeof checkTreeseedProviderConnections>[];
|
|
356
432
|
validationByScope: Record<TreeseedConfigScope, ReturnType<typeof validateTreeseedEnvironmentValues>>;
|
|
357
433
|
readinessByScope: Record<TreeseedConfigScope, {
|
|
434
|
+
phase: string;
|
|
358
435
|
configured: boolean;
|
|
359
436
|
provisioned: boolean;
|
|
360
437
|
deployable: boolean;
|
|
438
|
+
blockers: string[];
|
|
439
|
+
warnings: string[];
|
|
361
440
|
checks: Record<string, unknown>;
|
|
362
441
|
}>;
|
|
363
442
|
};
|
|
@@ -371,4 +450,3 @@ export declare function collectTreeseedPrintEnvReport({ tenantRoot, scope, env,
|
|
|
371
450
|
revealSecrets: boolean;
|
|
372
451
|
entries: any;
|
|
373
452
|
};
|
|
374
|
-
export {};
|