@treeseed/sdk 0.4.12 → 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.
Files changed (98) hide show
  1. package/dist/control-plane-client.d.ts +60 -1
  2. package/dist/control-plane-client.js +59 -0
  3. package/dist/control-plane.d.ts +1 -1
  4. package/dist/control-plane.js +11 -4
  5. package/dist/d1-store.d.ts +58 -0
  6. package/dist/d1-store.js +64 -0
  7. package/dist/dispatch.js +6 -0
  8. package/dist/graph/schema.js +4 -0
  9. package/dist/index.d.ts +5 -1
  10. package/dist/index.js +32 -0
  11. package/dist/knowledge-coop.d.ts +223 -0
  12. package/dist/knowledge-coop.js +82 -0
  13. package/dist/model-registry.js +79 -0
  14. package/dist/operations/providers/default.js +128 -7
  15. package/dist/operations/services/config-runtime.d.ts +102 -24
  16. package/dist/operations/services/config-runtime.js +896 -160
  17. package/dist/operations/services/deploy.d.ts +223 -15
  18. package/dist/operations/services/deploy.js +626 -55
  19. package/dist/operations/services/git-workflow.d.ts +47 -3
  20. package/dist/operations/services/git-workflow.js +125 -19
  21. package/dist/operations/services/github-automation.d.ts +85 -0
  22. package/dist/operations/services/github-automation.js +220 -1
  23. package/dist/operations/services/key-agent.d.ts +118 -0
  24. package/dist/operations/services/key-agent.js +476 -0
  25. package/dist/operations/services/knowledge-coop-launch.d.ts +90 -0
  26. package/dist/operations/services/knowledge-coop-launch.js +753 -0
  27. package/dist/operations/services/knowledge-coop-packaging.d.ts +59 -0
  28. package/dist/operations/services/knowledge-coop-packaging.js +234 -0
  29. package/dist/operations/services/local-dev.d.ts +0 -1
  30. package/dist/operations/services/local-dev.js +1 -14
  31. package/dist/operations/services/project-platform.d.ts +42 -182
  32. package/dist/operations/services/project-platform.js +162 -59
  33. package/dist/operations/services/railway-deploy.d.ts +1 -0
  34. package/dist/operations/services/railway-deploy.js +31 -13
  35. package/dist/operations/services/runtime-tools.d.ts +52 -5
  36. package/dist/operations/services/runtime-tools.js +186 -26
  37. package/dist/operations/services/watch-dev.js +2 -4
  38. package/dist/operations/services/workspace-preflight.d.ts +4 -4
  39. package/dist/operations/services/workspace-preflight.js +22 -20
  40. package/dist/operations/services/workspace-save.d.ts +10 -1
  41. package/dist/operations/services/workspace-save.js +54 -3
  42. package/dist/operations/services/workspace-tools.d.ts +1 -0
  43. package/dist/operations/services/workspace-tools.js +20 -5
  44. package/dist/operations-registry.js +15 -8
  45. package/dist/operations-types.d.ts +2 -2
  46. package/dist/platform/contracts.d.ts +39 -3
  47. package/dist/platform/deploy-config.d.ts +12 -1
  48. package/dist/platform/deploy-config.js +214 -15
  49. package/dist/platform/deploy-runtime.d.ts +1 -0
  50. package/dist/platform/deploy-runtime.js +10 -2
  51. package/dist/platform/env.yaml +93 -61
  52. package/dist/platform/environment.d.ts +13 -2
  53. package/dist/platform/environment.js +90 -20
  54. package/dist/platform/plugins/constants.d.ts +1 -0
  55. package/dist/platform/plugins/constants.js +7 -6
  56. package/dist/platform/tenant/runtime-config.js +8 -1
  57. package/dist/platform/tenant-config.js +4 -0
  58. package/dist/platform/utils/site-config-schema.js +18 -0
  59. package/dist/plugin-default.js +2 -2
  60. package/dist/scripts/key-agent.js +165 -0
  61. package/dist/scripts/tenant-build.js +4 -1
  62. package/dist/scripts/tenant-check.js +4 -1
  63. package/dist/scripts/tenant-deploy.js +43 -4
  64. package/dist/scripts/tenant-dev.js +0 -1
  65. package/dist/scripts/workspace-start-warning.js +2 -2
  66. package/dist/sdk-types.d.ts +2 -2
  67. package/dist/sdk-types.js +2 -0
  68. package/dist/sdk.d.ts +13 -0
  69. package/dist/sdk.js +40 -0
  70. package/dist/stores/knowledge-coop-store.d.ts +56 -0
  71. package/dist/stores/knowledge-coop-store.js +482 -0
  72. package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +6 -2
  73. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/api/server.js +4 -0
  74. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +25 -0
  75. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/decisions/adopt-initial-proposal-loop.mdx +22 -0
  76. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/people/starter-steward.mdx +11 -0
  77. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/proposals/establish-initial-proposal-loop.mdx +17 -0
  78. package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +17 -10
  79. package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +69 -7
  80. package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +1 -0
  81. package/dist/workflow/operations.d.ts +592 -243
  82. package/dist/workflow/operations.js +1908 -219
  83. package/dist/workflow/runs.d.ts +90 -0
  84. package/dist/workflow/runs.js +242 -0
  85. package/dist/workflow/session.d.ts +31 -0
  86. package/dist/workflow/session.js +97 -0
  87. package/dist/workflow-state.d.ts +88 -2
  88. package/dist/workflow-state.js +288 -26
  89. package/dist/workflow-support.d.ts +1 -1
  90. package/dist/workflow-support.js +32 -2
  91. package/dist/workflow.d.ts +93 -3
  92. package/dist/workflow.js +12 -0
  93. package/package.json +1 -1
  94. package/templates/github/deploy.workflow.yml +11 -1
  95. package/dist/scripts/sync-dev-vars.js +0 -6
  96. package/dist/scripts/workspace-close.js +0 -24
  97. package/dist/scripts/workspace-release.js +0 -42
  98. package/dist/scripts/workspace-start.js +0 -71
@@ -11,11 +11,15 @@
11
11
  "setup": "npm install",
12
12
  "setup:ci": "npm ci",
13
13
  "config": "treeseed config",
14
+ "preflight": "treeseed preflight",
14
15
  "dev": "treeseed dev",
16
+ "dev:web": "treeseed dev:web",
17
+ "dev:api": "treeseed dev:api",
15
18
  "dev:watch": "treeseed dev --watch",
16
19
  "check": "treeseed check",
17
- "build": "treeseed build",
18
- "deploy": "treeseed deploy",
20
+ "build:web": "treeseed build",
21
+ "build": "npm run build:web",
22
+ "deploy": "treeseed release",
19
23
  "preview": "treeseed preview",
20
24
  "sync": "treeseed sync",
21
25
  "verify": "npm run check && npm run build"
@@ -0,0 +1,4 @@
1
+ import { createRailwayTreeseedApiServer } from '@treeseed/core/api';
2
+
3
+ const server = await createRailwayTreeseedApiServer();
4
+ console.log(`Treeseed project API listening on ${server.url}`);
@@ -9,6 +9,10 @@ site:
9
9
  items:
10
10
  - label: Handbook
11
11
  href: /knowledge/handbook/
12
+ - label: Proposals
13
+ href: /proposals/
14
+ - label: Decisions
15
+ href: /decisions/
12
16
  - label: Build
13
17
  items:
14
18
  - label: Welcome
@@ -38,3 +42,24 @@ models:
38
42
  docs:
39
43
  defaults:
40
44
  tags: []
45
+ notes:
46
+ defaults:
47
+ author: __SITE_NAME__
48
+ draft: false
49
+ tags: []
50
+ questions:
51
+ defaults:
52
+ draft: false
53
+ tags: []
54
+ objectives:
55
+ defaults:
56
+ draft: false
57
+ tags: []
58
+ proposals:
59
+ defaults:
60
+ draft: false
61
+ tags: []
62
+ decisions:
63
+ defaults:
64
+ draft: false
65
+ tags: []
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: decision:adopt-initial-proposal-loop
3
+ title: Adopt The Initial Proposal Loop
4
+ description: Seed the starter with a decision record alongside the initial proposal.
5
+ date: 2026-04-17
6
+ summary: The starter demonstrates that decisions are first-class records, not hidden implementation residue.
7
+ status: live
8
+ decisionType: approved
9
+ rationale: Teams benefit from a visible pattern for recording what was chosen and why.
10
+ authority: Starter template
11
+ primaryContributor: starter-steward
12
+ relatedObjectives: []
13
+ relatedQuestions: []
14
+ relatedNotes: []
15
+ relatedProposals:
16
+ - establish-initial-proposal-loop
17
+ relatedBooks: []
18
+ implements:
19
+ - starter
20
+ ---
21
+
22
+ This starter decision exists to make the proposal-to-decision loop visible in a freshly generated TreeSeed site.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Starter Steward
3
+ role: Maintainer
4
+ affiliation: Starter template
5
+ status: live
6
+ tags:
7
+ - stewardship
8
+ - starter
9
+ ---
10
+
11
+ This placeholder profile exists so the starter can model contributor-linked content from the first commit.
@@ -0,0 +1,17 @@
1
+ ---
2
+ id: proposal:establish-initial-proposal-loop
3
+ title: Establish The Initial Proposal Loop
4
+ description: Seed the starter with a proposal so suggested changes are explicit from day one.
5
+ date: 2026-04-17
6
+ summary: The starter should show how a team can move from questions and objectives into a concrete proposal.
7
+ status: live
8
+ proposalType: strategy
9
+ motivation: New sites should inherit a visible proposal-to-decision pattern instead of recreating it ad hoc.
10
+ primaryContributor: starter-steward
11
+ relatedObjectives: []
12
+ relatedQuestions: []
13
+ relatedNotes: []
14
+ relatedBooks: []
15
+ ---
16
+
17
+ Use this starter proposal as a placeholder for the first concrete change a team wants to make in its site or operating model.
@@ -3,17 +3,24 @@ siteConfigPath: ./src/config.yaml
3
3
  content:
4
4
  docs: ./src/content/knowledge
5
5
  pages: ./src/content/pages
6
- notes: ./src/content/empty
7
- questions: ./src/content/empty
8
- objectives: ./src/content/empty
9
- people: ./src/content/empty
10
- agents: ./src/content/empty
11
- books: ./src/content/empty
6
+ notes: ./src/content/notes
7
+ questions: ./src/content/questions
8
+ objectives: ./src/content/objectives
9
+ proposals: ./src/content/proposals
10
+ decisions: ./src/content/decisions
11
+ people: ./src/content/people
12
+ agents: ./src/content/agents
13
+ books: ./src/content/books
14
+ templates: ./src/content/templates
15
+ knowledge_packs: ./src/content/knowledge-packs
16
+ workdays: ./src/content/workdays
12
17
  features:
13
18
  docs: true
14
19
  books: false
15
- notes: false
16
- questions: false
17
- objectives: false
18
- agents: false
20
+ notes: true
21
+ questions: true
22
+ objectives: true
23
+ proposals: true
24
+ decisions: true
25
+ agents: true
19
26
  forms: false
@@ -5,12 +5,14 @@ contactEmail: __CONTACT_EMAIL__
5
5
  hosting:
6
6
  kind: hosted_project
7
7
  registration: optional
8
- marketBaseUrl: https://api.treeseed.ai
8
+ marketBaseUrl: https://knowledge.coop
9
9
  teamId: __SITE_SLUG__
10
10
  projectId: __SITE_SLUG__
11
11
  cloudflare:
12
12
  accountId: replace-with-cloudflare-account-id
13
13
  workerName: __SITE_SLUG__
14
+ queueName: __SITE_SLUG__-agent-work
15
+ dlqName: __SITE_SLUG__-agent-work-dlq
14
16
  pages:
15
17
  projectName: __SITE_SLUG__
16
18
  previewProjectName: __SITE_SLUG__-staging
@@ -23,17 +25,77 @@ cloudflare:
23
25
  manifestKeyTemplate: teams/{teamId}/published/common.json
24
26
  previewRootTemplate: teams/{teamId}/previews
25
27
  previewTtlHours: 168
28
+ surfaces:
29
+ web:
30
+ enabled: true
31
+ provider: cloudflare
32
+ rootDir: .
33
+ publicBaseUrl: https://__SITE_SLUG__.pages.dev
34
+ localBaseUrl: http://127.0.0.1:4321
35
+ api:
36
+ enabled: true
37
+ provider: railway
38
+ rootDir: .
39
+ localBaseUrl: http://127.0.0.1:3000
40
+ services:
41
+ api:
42
+ enabled: true
43
+ provider: railway
44
+ rootDir: .
45
+ publicBaseUrl: https://__SITE_SLUG__-api.up.railway.app
46
+ railway:
47
+ serviceName: __SITE_SLUG__-api
48
+ buildCommand: npm run build
49
+ startCommand: node ./src/api/server.js
50
+ environments:
51
+ local:
52
+ baseUrl: http://127.0.0.1:3000
53
+ manager:
54
+ enabled: true
55
+ provider: railway
56
+ railway:
57
+ serviceName: __SITE_SLUG__-manager
58
+ rootDir: .
59
+ buildCommand: npm run build
60
+ startCommand: node ./node_modules/@treeseed/core/dist/services/manager.js
61
+ schedule: '*/5 * * * *'
62
+ worker:
63
+ enabled: true
64
+ provider: railway
65
+ railway:
66
+ serviceName: __SITE_SLUG__-worker
67
+ rootDir: .
68
+ buildCommand: npm run build
69
+ startCommand: node ./node_modules/@treeseed/core/dist/services/worker.js
70
+ workdayStart:
71
+ enabled: true
72
+ provider: railway
73
+ railway:
74
+ serviceName: __SITE_SLUG__-workday-start
75
+ rootDir: .
76
+ buildCommand: npm run build
77
+ startCommand: node ./node_modules/@treeseed/core/dist/services/workday-start.js
78
+ schedule: '0 9 * * 1-5'
79
+ workdayReport:
80
+ enabled: true
81
+ provider: railway
82
+ railway:
83
+ serviceName: __SITE_SLUG__-workday-report
84
+ rootDir: .
85
+ buildCommand: npm run build
86
+ startCommand: node ./node_modules/@treeseed/core/dist/services/workday-report.js
87
+ schedule: '5 17 * * 1-5'
26
88
  plugins:
27
- - package: '@treeseed/sdk/plugin-default'
89
+ - package: '@treeseed/core/plugin-default'
28
90
  providers:
29
91
  forms: store_only
30
92
  agents:
31
- execution: stub
93
+ execution: copilot
32
94
  mutation: local_branch
33
- repository: stub
34
- verification: stub
35
- notification: stub
36
- research: stub
95
+ repository: git
96
+ verification: local
97
+ notification: sdk_message
98
+ research: project_graph
37
99
  deploy: cloudflare
38
100
  content:
39
101
  runtime: team_scoped_r2_overlay
@@ -78,6 +78,7 @@
78
78
  "astro.config.ts",
79
79
  "tsconfig.json",
80
80
  "treeseed.site.yaml",
81
+ "src/api/server.js",
81
82
  "src/content.config.ts",
82
83
  "src/config.yaml",
83
84
  "src/manifest.yaml",