t44 0.4.0-rc.10
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/.dco-signatures +9 -0
- package/.github/workflows/dco.yaml +12 -0
- package/.github/workflows/gordian-open-integrity.yaml +13 -0
- package/.o/GordianOpenIntegrity-CurrentLifehash.svg +1026 -0
- package/.o/GordianOpenIntegrity-InceptionLifehash.svg +1026 -0
- package/.o/GordianOpenIntegrity.yaml +25 -0
- package/.o/assets/Hero-Terminal44-v0.jpeg +0 -0
- package/DCO.md +34 -0
- package/LICENSE.md +203 -0
- package/README.md +185 -0
- package/bin/activate +36 -0
- package/bin/activate.ts +30 -0
- package/bin/postinstall.sh +19 -0
- package/bin/shell +27 -0
- package/bin/t44 +27 -0
- package/caps/ConfigSchemaStruct.ts +55 -0
- package/caps/Home.ts +57 -0
- package/caps/HomeRegistry.ts +319 -0
- package/caps/HomeRegistryFile.ts +144 -0
- package/caps/JsonSchemas.ts +220 -0
- package/caps/OpenApiSchema.ts +67 -0
- package/caps/PackageDescriptor.ts +88 -0
- package/caps/ProjectCatalogs.ts +153 -0
- package/caps/ProjectDeployment.ts +363 -0
- package/caps/ProjectDevelopment.ts +257 -0
- package/caps/ProjectPublishing.ts +522 -0
- package/caps/ProjectRack.ts +155 -0
- package/caps/ProjectRepository.ts +322 -0
- package/caps/RootKey.ts +219 -0
- package/caps/SigningKey.ts +243 -0
- package/caps/WorkspaceCli.ts +442 -0
- package/caps/WorkspaceConfig.ts +268 -0
- package/caps/WorkspaceConfig.yaml +71 -0
- package/caps/WorkspaceConfigFile.ts +807 -0
- package/caps/WorkspaceConnection.ts +256 -0
- package/caps/WorkspaceEntityConfig.ts +78 -0
- package/caps/WorkspaceEntityConfig.v0.ts +77 -0
- package/caps/WorkspaceEntityFact.ts +218 -0
- package/caps/WorkspaceInfo.ts +595 -0
- package/caps/WorkspaceInit.ts +30 -0
- package/caps/WorkspaceKey.ts +338 -0
- package/caps/WorkspaceModel.ts +373 -0
- package/caps/WorkspaceProjects.ts +636 -0
- package/caps/WorkspacePrompt.ts +406 -0
- package/caps/WorkspaceShell.sh +39 -0
- package/caps/WorkspaceShell.ts +104 -0
- package/caps/WorkspaceShell.yaml +64 -0
- package/caps/WorkspaceShellCli.ts +109 -0
- package/caps/WorkspaceTest.ts +167 -0
- package/caps/providers/README.md +2 -0
- package/caps/providers/bunny.net/ProjectDeployment.ts +327 -0
- package/caps/providers/bunny.net/api-pull.test.ts +319 -0
- package/caps/providers/bunny.net/api-pull.ts +164 -0
- package/caps/providers/bunny.net/api-storage.test.ts +168 -0
- package/caps/providers/bunny.net/api-storage.ts +248 -0
- package/caps/providers/bunny.net/api.ts +95 -0
- package/caps/providers/dynadot.com/ProjectDeployment.ts +202 -0
- package/caps/providers/dynadot.com/api-domains.test.ts +224 -0
- package/caps/providers/dynadot.com/api-domains.ts +169 -0
- package/caps/providers/dynadot.com/api-restful-v1.test.ts +190 -0
- package/caps/providers/dynadot.com/api-restful-v1.ts +94 -0
- package/caps/providers/dynadot.com/api-restful-v2.test.ts +200 -0
- package/caps/providers/dynadot.com/api-restful-v2.ts +94 -0
- package/caps/providers/git-scm.com/ProjectPublishing.ts +654 -0
- package/caps/providers/github.com/ProjectPublishing.ts +133 -0
- package/caps/providers/github.com/api.ts +130 -0
- package/caps/providers/npmjs.com/ProjectPublishing.ts +536 -0
- package/caps/providers/semver.org/ProjectPublishing.ts +286 -0
- package/caps/providers/vercel.com/ProjectDeployment.ts +326 -0
- package/caps/providers/vercel.com/api.test.ts +67 -0
- package/caps/providers/vercel.com/api.ts +132 -0
- package/caps/providers/vercel.com/bun.lock +194 -0
- package/caps/providers/vercel.com/package.json +10 -0
- package/caps/providers/vercel.com/project.test.ts +108 -0
- package/caps/providers/vercel.com/project.ts +150 -0
- package/caps/providers/vercel.com/tsconfig.json +28 -0
- package/docs/Overview.drawio +248 -0
- package/docs/Overview.svg +4 -0
- package/examples/01-Lifecycle/main.test.ts +228 -0
- package/lib/crypto.ts +53 -0
- package/lib/key.ts +369 -0
- package/lib/schema-console-renderer.ts +181 -0
- package/lib/schema-resolver.ts +349 -0
- package/lib/ucan.ts +137 -0
- package/package.json +102 -0
- package/standalone-rt.ts +121 -0
- package/structs/HomeRegistry.ts +55 -0
- package/structs/HomeRegistryConfig.ts +60 -0
- package/structs/ProjectCatalogsConfig.ts +53 -0
- package/structs/ProjectDeploymentConfig.ts +56 -0
- package/structs/ProjectDeploymentFact.ts +106 -0
- package/structs/ProjectPublishingFact.ts +68 -0
- package/structs/ProjectRack.ts +51 -0
- package/structs/ProjectRackConfig.ts +56 -0
- package/structs/RepositoryOriginDescriptor.ts +51 -0
- package/structs/RootKeyConfig.ts +64 -0
- package/structs/SigningKeyConfig.ts +64 -0
- package/structs/Workspace.ts +56 -0
- package/structs/WorkspaceCatalogs.ts +56 -0
- package/structs/WorkspaceCliConfig.ts +53 -0
- package/structs/WorkspaceConfig.ts +64 -0
- package/structs/WorkspaceConfigFile.ts +50 -0
- package/structs/WorkspaceConfigFileMeta.ts +70 -0
- package/structs/WorkspaceKey.ts +55 -0
- package/structs/WorkspaceKeyConfig.ts +56 -0
- package/structs/WorkspaceMappingsConfig.ts +56 -0
- package/structs/WorkspaceProject.ts +104 -0
- package/structs/WorkspaceProjectsConfig.ts +67 -0
- package/structs/WorkspacePublishingConfig.ts +65 -0
- package/structs/WorkspaceShellConfig.ts +83 -0
- package/structs/providers/README.md +2 -0
- package/structs/providers/bunny.net/PullZoneFact.ts +55 -0
- package/structs/providers/bunny.net/PullZoneListFact.ts +55 -0
- package/structs/providers/bunny.net/StorageZoneFact.ts +55 -0
- package/structs/providers/bunny.net/StorageZoneListFact.ts +55 -0
- package/structs/providers/bunny.net/WorkspaceConnectionConfig.ts +43 -0
- package/structs/providers/dynadot.com/DomainFact.ts +46 -0
- package/structs/providers/dynadot.com/WorkspaceConnectionConfig.ts +54 -0
- package/structs/providers/git-scm.com/ProjectPublishingFact.ts +46 -0
- package/structs/providers/github.com/ProjectPublishingFact.ts +46 -0
- package/structs/providers/github.com/WorkspaceConnectionConfig.ts +43 -0
- package/structs/providers/npmjs.com/ProjectPublishingFact.ts +46 -0
- package/structs/providers/vercel.com/ProjectDeploymentFact.ts +55 -0
- package/structs/providers/vercel.com/WorkspaceConnectionConfig.ts +49 -0
- package/tsconfig.json +28 -0
- package/workspace-rt.ts +134 -0
- package/workspace.yaml +3 -0
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "t44",
|
|
3
|
+
"version": "0.4.0-rc.10",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Stream44/t44.git"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"bin": {
|
|
11
|
+
"t44": "./bin/t44"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
"./workspace-rt": "./workspace-rt.ts",
|
|
15
|
+
"./standalone-rt": "./standalone-rt.ts",
|
|
16
|
+
"./caps/Home": "./caps/Home.ts",
|
|
17
|
+
"./caps/HomeRegistry": "./caps/HomeRegistry.ts",
|
|
18
|
+
"./caps/OpenApiSchema": "./caps/OpenApiSchema.ts",
|
|
19
|
+
"./caps/JsonSchemas": "./caps/JsonSchemas.ts",
|
|
20
|
+
"./caps/ProjectDeployment": "./caps/ProjectDeployment.ts",
|
|
21
|
+
"./caps/ProjectDevelopment": "./caps/ProjectDevelopment.ts",
|
|
22
|
+
"./caps/ProjectPublishing": "./caps/ProjectPublishing.ts",
|
|
23
|
+
"./caps/ProjectRack": "./caps/ProjectRack.ts",
|
|
24
|
+
"./caps/WorkspaceCli": "./caps/WorkspaceCli.ts",
|
|
25
|
+
"./caps/WorkspaceConfig": "./caps/WorkspaceConfig.ts",
|
|
26
|
+
"./caps/WorkspaceConnection": "./caps/WorkspaceConnection.ts",
|
|
27
|
+
"./caps/WorkspaceEntityConfig": "./caps/WorkspaceEntityConfig.ts",
|
|
28
|
+
"./caps/WorkspaceEntityFact": "./caps/WorkspaceEntityFact.ts",
|
|
29
|
+
"./caps/WorkspaceInfo": "./caps/WorkspaceInfo.ts",
|
|
30
|
+
"./caps/WorkspaceInit": "./caps/WorkspaceInit.ts",
|
|
31
|
+
"./caps/RootKey": "./caps/RootKey.ts",
|
|
32
|
+
"./caps/WorkspaceKey": "./caps/WorkspaceKey.ts",
|
|
33
|
+
"./caps/WorkspaceProjects": "./caps/WorkspaceProjects.ts",
|
|
34
|
+
"./caps/WorkspacePrompt": "./caps/WorkspacePrompt.ts",
|
|
35
|
+
"./caps/WorkspaceShell": "./caps/WorkspaceShell.ts",
|
|
36
|
+
"./caps/WorkspaceShellCli": "./caps/WorkspaceShellCli.ts",
|
|
37
|
+
"./caps/WorkspaceTest": "./caps/WorkspaceTest.ts",
|
|
38
|
+
"./caps/providers/bunny.net/ProjectDeployment": "./caps/providers/bunny.net/ProjectDeployment.ts",
|
|
39
|
+
"./caps/providers/dynadot.com/ProjectDeployment": "./caps/providers/dynadot.com/ProjectDeployment.ts",
|
|
40
|
+
"./caps/providers/git-scm.com/ProjectPublishing": "./caps/providers/git-scm.com/ProjectPublishing.ts",
|
|
41
|
+
"./caps/providers/github.com/ProjectPublishing": "./caps/providers/github.com/ProjectPublishing.ts",
|
|
42
|
+
"./caps/providers/npmjs.com/ProjectPublishing": "./caps/providers/npmjs.com/ProjectPublishing.ts",
|
|
43
|
+
"./caps/providers/semver.org/ProjectPublishing": "./caps/providers/semver.org/ProjectPublishing.ts",
|
|
44
|
+
"./caps/providers/vercel.com/ProjectDeployment": "./caps/providers/vercel.com/ProjectDeployment.ts",
|
|
45
|
+
"./structs/HomeRegistryConfig": "./structs/HomeRegistryConfig.ts",
|
|
46
|
+
"./structs/RootKeyConfig": "./structs/RootKeyConfig.ts",
|
|
47
|
+
"./structs/ProjectDeploymentConfig": "./structs/ProjectDeploymentConfig.ts",
|
|
48
|
+
"./structs/ProjectDeploymentFact": "./structs/ProjectDeploymentFact.ts",
|
|
49
|
+
"./structs/ProjectPublishingFact": "./structs/ProjectPublishingFact.ts",
|
|
50
|
+
"./structs/ProjectRackConfig": "./structs/ProjectRackConfig.ts",
|
|
51
|
+
"./structs/WorkspaceCliConfig": "./structs/WorkspaceCliConfig.ts",
|
|
52
|
+
"./structs/WorkspaceConfig": "./structs/WorkspaceConfig.ts",
|
|
53
|
+
"./structs/WorkspaceKeyConfig": "./structs/WorkspaceKeyConfig.ts",
|
|
54
|
+
"./structs/WorkspaceMappingsConfig": "./structs/WorkspaceMappingsConfig.ts",
|
|
55
|
+
"./structs/WorkspaceProjectsConfig": "./structs/WorkspaceProjectsConfig.ts",
|
|
56
|
+
"./structs/WorkspacePublishingConfig": "./structs/WorkspacePublishingConfig.ts",
|
|
57
|
+
"./structs/WorkspaceShellConfig": "./structs/WorkspaceShellConfig.ts",
|
|
58
|
+
"./structs/providers/bunny.net/PullZoneFact": "./structs/providers/bunny.net/PullZoneFact.ts",
|
|
59
|
+
"./structs/providers/bunny.net/PullZoneListFact": "./structs/providers/bunny.net/PullZoneListFact.ts",
|
|
60
|
+
"./structs/providers/bunny.net/StorageZoneFact": "./structs/providers/bunny.net/StorageZoneFact.ts",
|
|
61
|
+
"./structs/providers/bunny.net/StorageZoneListFact": "./structs/providers/bunny.net/StorageZoneListFact.ts",
|
|
62
|
+
"./structs/providers/bunny.net/WorkspaceConnectionConfig": "./structs/providers/bunny.net/WorkspaceConnectionConfig.ts",
|
|
63
|
+
"./structs/providers/dynadot.com/DomainFact": "./structs/providers/dynadot.com/DomainFact.ts",
|
|
64
|
+
"./structs/providers/dynadot.com/WorkspaceConnectionConfig": "./structs/providers/dynadot.com/WorkspaceConnectionConfig.ts",
|
|
65
|
+
"./structs/providers/git-scm.com/ProjectPublishingFact": "./structs/providers/git-scm.com/ProjectPublishingFact.ts",
|
|
66
|
+
"./structs/providers/github.com/ProjectPublishingFact": "./structs/providers/github.com/ProjectPublishingFact.ts",
|
|
67
|
+
"./structs/providers/github.com/WorkspaceConnectionConfig": "./structs/providers/github.com/WorkspaceConnectionConfig.ts",
|
|
68
|
+
"./structs/providers/npmjs.com/ProjectPublishingFact": "./structs/providers/npmjs.com/ProjectPublishingFact.ts",
|
|
69
|
+
"./structs/providers/vercel.com/ProjectDeploymentFact": "./structs/providers/vercel.com/ProjectDeploymentFact.ts",
|
|
70
|
+
"./structs/providers/vercel.com/WorkspaceConnectionConfig": "./structs/providers/vercel.com/WorkspaceConnectionConfig.ts"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"ajv": "^8.17.1",
|
|
74
|
+
"ajv-formats": "^3.0.1",
|
|
75
|
+
"js-yaml": "^4.1.0",
|
|
76
|
+
"commander": "^14.0.0",
|
|
77
|
+
"chalk": "^5.6.2",
|
|
78
|
+
"dotenv": "^17.2.3",
|
|
79
|
+
"fast-glob": "^3.3.3",
|
|
80
|
+
"inquirer": "^12.4.0",
|
|
81
|
+
"upload-to-bunny": "^2.1.0",
|
|
82
|
+
"axios": "^1.13.4",
|
|
83
|
+
"vercel": "^50.4.9",
|
|
84
|
+
"turbo": "^2.7.5",
|
|
85
|
+
"@ucanto/principal": "^9.0.3",
|
|
86
|
+
"@ucanto/server": "^11.0.3",
|
|
87
|
+
"json-schema-ref-resolver": "^3.0.0",
|
|
88
|
+
"@stream44.studio/encapsulate": "^0.4.0-rc.9",
|
|
89
|
+
"@stream44.studio/dco": "^0.3.0-rc.9",
|
|
90
|
+
"@stream44.studio/t44-blockchaincommons.com": "^0.1.0-rc.10"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@types/bun": "^1.3.4",
|
|
94
|
+
"@types/node": "^25.0.3",
|
|
95
|
+
"@types/js-yaml": "^4.0.9",
|
|
96
|
+
"bun-types": "^1.3.4"
|
|
97
|
+
},
|
|
98
|
+
"workspaces": [
|
|
99
|
+
"caps/providers/vercel.com"
|
|
100
|
+
],
|
|
101
|
+
"private": false
|
|
102
|
+
}
|
package/standalone-rt.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/// <reference types="bun" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
|
|
5
|
+
const startTime = Date.now()
|
|
6
|
+
|
|
7
|
+
import { resolve, join } from 'path'
|
|
8
|
+
import { access } from 'fs/promises'
|
|
9
|
+
import chalk from 'chalk'
|
|
10
|
+
import { CapsuleSpineFactory } from "@stream44.studio/encapsulate/spine-factories/CapsuleSpineFactory.v0"
|
|
11
|
+
import { CapsuleSpineContract } from "@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0/Membrane.v0"
|
|
12
|
+
import { TimingObserver } from "@stream44.studio/encapsulate/spine-factories/TimingObserver"
|
|
13
|
+
|
|
14
|
+
async function findPackageRoot(startDir: string): Promise<string> {
|
|
15
|
+
let dir = resolve(startDir)
|
|
16
|
+
while (true) {
|
|
17
|
+
try {
|
|
18
|
+
await access(join(dir, 'package.json'))
|
|
19
|
+
return dir
|
|
20
|
+
} catch { }
|
|
21
|
+
const parent = resolve(dir, '..')
|
|
22
|
+
if (parent === dir) return resolve(startDir)
|
|
23
|
+
dir = parent
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function run(encapsulateHandler: any, runHandler: any, options?: { importMeta?: { dir: string } }) {
|
|
28
|
+
|
|
29
|
+
const timing = process.argv.includes('--trace') ? TimingObserver({ startTime }) : undefined
|
|
30
|
+
|
|
31
|
+
timing?.recordMajor('INIT SPINE')
|
|
32
|
+
|
|
33
|
+
const eventsByKey = new Map<string, any>()
|
|
34
|
+
|
|
35
|
+
const spineFilesystemRoot = options?.importMeta?.dir
|
|
36
|
+
? await findPackageRoot(options.importMeta.dir)
|
|
37
|
+
: process.cwd()
|
|
38
|
+
|
|
39
|
+
const { encapsulate, freeze, CapsulePropertyTypes, makeImportStack, hoistSnapshot } = await CapsuleSpineFactory({
|
|
40
|
+
spineFilesystemRoot,
|
|
41
|
+
capsuleModuleProjectionRoot: (import.meta as any).dir,
|
|
42
|
+
enableCallerStackInference: true,
|
|
43
|
+
spineContracts: {
|
|
44
|
+
['#' + CapsuleSpineContract['#']]: CapsuleSpineContract
|
|
45
|
+
},
|
|
46
|
+
timing,
|
|
47
|
+
onMembraneEvent: timing ? (event: any) => {
|
|
48
|
+
const instanceId = event.target?.spineContractCapsuleInstanceId
|
|
49
|
+
const eventIndex = event.eventIndex
|
|
50
|
+
|
|
51
|
+
// Store event by composite key (instance ID + event index)
|
|
52
|
+
const key = `${eventIndex}`
|
|
53
|
+
eventsByKey.set(key, event)
|
|
54
|
+
|
|
55
|
+
let capsuleRef = event.target?.capsuleSourceLineRef
|
|
56
|
+
let prop = event.target?.prop
|
|
57
|
+
let callerLocation = event.caller ? `${event.caller.filepath}:${event.caller.line}` : 'unknown'
|
|
58
|
+
const eventType = event.event
|
|
59
|
+
|
|
60
|
+
// For call-result events, look up the original call event to get all info
|
|
61
|
+
if (eventType === 'call-result') {
|
|
62
|
+
const callKey = `${event.callEventIndex}`
|
|
63
|
+
const callEvent = eventsByKey.get(callKey)
|
|
64
|
+
if (callEvent) {
|
|
65
|
+
capsuleRef = callEvent.target?.capsuleSourceLineRef || capsuleRef
|
|
66
|
+
prop = callEvent.target?.prop || prop
|
|
67
|
+
if (callEvent.caller) {
|
|
68
|
+
callerLocation = `${callEvent.caller.filepath}:${callEvent.caller.line}`
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
console.error(
|
|
74
|
+
chalk.gray(`[${eventIndex}]`),
|
|
75
|
+
chalk.cyan(eventType.padEnd(12)),
|
|
76
|
+
chalk.yellow(capsuleRef),
|
|
77
|
+
chalk.magenta(`.${prop}`),
|
|
78
|
+
chalk.dim(`from ${callerLocation}`)
|
|
79
|
+
)
|
|
80
|
+
} : undefined
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
timing?.recordMajor('ENCAPSULATE')
|
|
84
|
+
|
|
85
|
+
const exportedApi = await encapsulateHandler({
|
|
86
|
+
encapsulate,
|
|
87
|
+
CapsulePropertyTypes,
|
|
88
|
+
makeImportStack
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
timing?.recordMajor('FREEZE')
|
|
92
|
+
|
|
93
|
+
const snapshot = await freeze()
|
|
94
|
+
|
|
95
|
+
timing?.recordMajor('HOIST SNAPSHOT')
|
|
96
|
+
|
|
97
|
+
const { run } = await hoistSnapshot({
|
|
98
|
+
snapshot
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
timing?.recordMajor('RUN')
|
|
102
|
+
|
|
103
|
+
const result = await run({
|
|
104
|
+
overrides: {
|
|
105
|
+
['t44/caps/WorkspaceTest']: {
|
|
106
|
+
'#': {
|
|
107
|
+
testRootDir: options?.importMeta?.dir
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, async (opts) => {
|
|
112
|
+
return runHandler({
|
|
113
|
+
...opts,
|
|
114
|
+
...(exportedApi || {})
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
timing?.recordMajor('DONE')
|
|
119
|
+
|
|
120
|
+
return result
|
|
121
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
did: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The DID (Decentralized Identifier) of the home registry.'
|
|
19
|
+
},
|
|
20
|
+
privateKey: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The private key associated with the home registry DID.'
|
|
23
|
+
},
|
|
24
|
+
createdAt: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
format: 'date-time',
|
|
27
|
+
description: 'ISO 8601 timestamp of when the registry was created.'
|
|
28
|
+
},
|
|
29
|
+
rootDir: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Absolute path to the home registry root directory.'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
required: ['did', 'privateKey', 'createdAt', 'rootDir'],
|
|
35
|
+
additionalProperties: false,
|
|
36
|
+
description: 'Home registry identity containing the root DID and private key.'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
'#': {
|
|
42
|
+
capsuleName: {
|
|
43
|
+
type: CapsulePropertyTypes.Literal,
|
|
44
|
+
value: capsule['#']
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
extendsCapsule: 't44/caps/HomeRegistryFile',
|
|
50
|
+
importMeta: import.meta,
|
|
51
|
+
importStack: makeImportStack(),
|
|
52
|
+
capsuleName: capsule['#'],
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
capsule['#'] = 't44/structs/HomeRegistry'
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
homeDir: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Absolute path to the home directory (parent of registry, .ssh, etc).'
|
|
19
|
+
},
|
|
20
|
+
rootDir: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Absolute path to the home registry root directory.'
|
|
23
|
+
},
|
|
24
|
+
identifier: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'DID (Decentralized Identifier) of the home registry.'
|
|
27
|
+
},
|
|
28
|
+
createdAt: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'date-time',
|
|
31
|
+
description: 'ISO 8601 timestamp of when the entity config was created.'
|
|
32
|
+
},
|
|
33
|
+
updatedAt: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
format: 'date-time',
|
|
36
|
+
description: 'ISO 8601 timestamp of when the entity config was last updated.'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
required: ['createdAt', 'updatedAt'],
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
description: 'Home registry configuration with identity and location.'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
'#': {
|
|
47
|
+
capsuleName: {
|
|
48
|
+
type: CapsulePropertyTypes.Literal,
|
|
49
|
+
value: capsule['#']
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
extendsCapsule: 't44/caps/WorkspaceEntityConfig',
|
|
55
|
+
importMeta: import.meta,
|
|
56
|
+
importStack: makeImportStack(),
|
|
57
|
+
capsuleName: capsule['#'],
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
capsule['#'] = 't44/structs/HomeRegistryConfig'
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
catalogs: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
additionalProperties: true,
|
|
19
|
+
description: 'Map of catalog names to their configurations.'
|
|
20
|
+
},
|
|
21
|
+
createdAt: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'date-time',
|
|
24
|
+
description: 'ISO 8601 timestamp of when the entity config was created.'
|
|
25
|
+
},
|
|
26
|
+
updatedAt: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
format: 'date-time',
|
|
29
|
+
description: 'ISO 8601 timestamp of when the entity config was last updated.'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
required: ['createdAt', 'updatedAt'],
|
|
33
|
+
additionalProperties: false,
|
|
34
|
+
description: 'Project catalogs configuration.'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
'#': {
|
|
40
|
+
capsuleName: {
|
|
41
|
+
type: CapsulePropertyTypes.Literal,
|
|
42
|
+
value: capsule['#']
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
extendsCapsule: 't44/caps/WorkspaceEntityConfig',
|
|
48
|
+
importMeta: import.meta,
|
|
49
|
+
importStack: makeImportStack(),
|
|
50
|
+
capsuleName: capsule['#'],
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
capsule['#'] = 't44/structs/ProjectCatalogsConfig'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
deployments: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
additionalProperties: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
additionalProperties: true
|
|
21
|
+
},
|
|
22
|
+
description: 'Map of deployment names to their configurations.'
|
|
23
|
+
},
|
|
24
|
+
createdAt: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
format: 'date-time',
|
|
27
|
+
description: 'ISO 8601 timestamp of when the entity config was created.'
|
|
28
|
+
},
|
|
29
|
+
updatedAt: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
format: 'date-time',
|
|
32
|
+
description: 'ISO 8601 timestamp of when the entity config was last updated.'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
required: ['createdAt', 'updatedAt'],
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
description: 'Project deployment configurations for deployment providers.'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
'#': {
|
|
43
|
+
capsuleName: {
|
|
44
|
+
type: CapsulePropertyTypes.Literal,
|
|
45
|
+
value: capsule['#']
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
extendsCapsule: 't44/caps/WorkspaceEntityConfig',
|
|
51
|
+
importMeta: import.meta,
|
|
52
|
+
importStack: makeImportStack(),
|
|
53
|
+
capsuleName: capsule['#'],
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
capsule['#'] = 't44/structs/ProjectDeploymentConfig'
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
projectName: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The name of the deployed project'
|
|
19
|
+
},
|
|
20
|
+
provider: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The deployment provider (e.g., vercel.com, bunny.net)'
|
|
23
|
+
},
|
|
24
|
+
status: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
enum: ['READY', 'BUILDING', 'ERROR', 'DISABLED', 'UNKNOWN'],
|
|
27
|
+
description: 'Current deployment status'
|
|
28
|
+
},
|
|
29
|
+
publicUrl: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
format: 'uri',
|
|
32
|
+
description: 'The public URL where the deployment is accessible'
|
|
33
|
+
},
|
|
34
|
+
createdAt: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
format: 'date-time',
|
|
37
|
+
description: 'ISO 8601 timestamp when the deployment was created'
|
|
38
|
+
},
|
|
39
|
+
updatedAt: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
format: 'date-time',
|
|
42
|
+
description: 'ISO 8601 timestamp when the deployment was last updated'
|
|
43
|
+
},
|
|
44
|
+
providerProjectId: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Provider-specific project identifier'
|
|
47
|
+
},
|
|
48
|
+
providerPortalUrl: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
format: 'uri',
|
|
51
|
+
description: 'URL to the provider admin portal for this deployment'
|
|
52
|
+
},
|
|
53
|
+
usage: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
storageBytes: {
|
|
57
|
+
type: 'integer',
|
|
58
|
+
description: 'Storage used in bytes'
|
|
59
|
+
},
|
|
60
|
+
filesCount: {
|
|
61
|
+
type: 'integer',
|
|
62
|
+
description: 'Number of files stored'
|
|
63
|
+
},
|
|
64
|
+
bandwidthBytes: {
|
|
65
|
+
type: 'integer',
|
|
66
|
+
description: 'Bandwidth used in bytes (monthly)'
|
|
67
|
+
},
|
|
68
|
+
charges: {
|
|
69
|
+
type: 'number',
|
|
70
|
+
description: 'Monthly charges in USD'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
description: 'Usage statistics for the deployment'
|
|
74
|
+
},
|
|
75
|
+
error: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'Error message if status retrieval failed'
|
|
78
|
+
},
|
|
79
|
+
rawDefinitionFilepaths: {
|
|
80
|
+
type: 'array',
|
|
81
|
+
items: {
|
|
82
|
+
type: 'string'
|
|
83
|
+
},
|
|
84
|
+
description: 'Relative filepaths to the raw provider-specific definition files'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
required: ['projectName', 'provider', 'rawDefinitionFilepaths']
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
'#': {
|
|
93
|
+
capsuleName: {
|
|
94
|
+
type: CapsulePropertyTypes.Literal,
|
|
95
|
+
value: capsule['#']
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
extendsCapsule: 't44/caps/WorkspaceEntityFact',
|
|
101
|
+
importMeta: import.meta,
|
|
102
|
+
importStack: makeImportStack(),
|
|
103
|
+
capsuleName: capsule['#'],
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
capsule['#'] = 't44/structs/ProjectDeploymentFact'
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
export async function capsule({
|
|
3
|
+
encapsulate,
|
|
4
|
+
CapsulePropertyTypes,
|
|
5
|
+
makeImportStack
|
|
6
|
+
}: any) {
|
|
7
|
+
return encapsulate({
|
|
8
|
+
'#@stream44.studio/encapsulate/spine-contracts/CapsuleSpineContract.v0': {
|
|
9
|
+
'#t44/caps/ConfigSchemaStruct': {
|
|
10
|
+
as: 'schema',
|
|
11
|
+
options: {
|
|
12
|
+
'#': {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
projectName: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The name of the published project'
|
|
19
|
+
},
|
|
20
|
+
provider: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The publishing provider (e.g., github.com, git-scm.com, npmjs.com)'
|
|
23
|
+
},
|
|
24
|
+
status: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
enum: ['READY', 'PUBLISHED', 'ERROR', 'SKIPPED', 'UNKNOWN'],
|
|
27
|
+
description: 'Current publishing status'
|
|
28
|
+
},
|
|
29
|
+
publicUrl: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
format: 'uri',
|
|
32
|
+
description: 'The public URL where the published resource is accessible'
|
|
33
|
+
},
|
|
34
|
+
createdAt: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
format: 'date-time',
|
|
37
|
+
description: 'ISO 8601 timestamp when the publishing was created'
|
|
38
|
+
},
|
|
39
|
+
updatedAt: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
format: 'date-time',
|
|
42
|
+
description: 'ISO 8601 timestamp when the publishing was last updated'
|
|
43
|
+
},
|
|
44
|
+
error: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Error message if publishing failed'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
required: ['projectName', 'provider']
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
'#': {
|
|
55
|
+
capsuleName: {
|
|
56
|
+
type: CapsulePropertyTypes.Literal,
|
|
57
|
+
value: capsule['#']
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
extendsCapsule: 't44/caps/WorkspaceEntityFact',
|
|
63
|
+
importMeta: import.meta,
|
|
64
|
+
importStack: makeImportStack(),
|
|
65
|
+
capsuleName: capsule['#'],
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
capsule['#'] = 't44/structs/ProjectPublishingFact'
|