@fungi.computer/puffball 0.0.0-stage → 0.0.1

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 (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +443 -2
  3. package/dist/app-api.d.ts +7 -0
  4. package/dist/app-api.js +61 -0
  5. package/dist/app-backend-binding-vocabulary.d.ts +299 -0
  6. package/dist/app-backend-binding-vocabulary.js +257 -0
  7. package/dist/app-backend-bindings.d.ts +21 -0
  8. package/dist/app-backend-bindings.js +47 -0
  9. package/dist/app-declaration.d.ts +46 -0
  10. package/dist/app-declaration.js +115 -0
  11. package/dist/app-event-facts.d.ts +40 -0
  12. package/dist/app-event-facts.js +28 -0
  13. package/dist/app-method-context.d.ts +109 -0
  14. package/dist/app-method-context.js +9 -0
  15. package/dist/app-method-runtime.d.ts +86 -0
  16. package/dist/app-method-runtime.js +122 -0
  17. package/dist/app-origin-paths.d.ts +6 -0
  18. package/dist/app-origin-paths.js +6 -0
  19. package/dist/app-vocabulary.d.ts +189 -0
  20. package/dist/app-vocabulary.js +103 -0
  21. package/dist/app.d.ts +379 -0
  22. package/dist/app.js +71 -0
  23. package/dist/artifact-dispositions.d.ts +115 -0
  24. package/dist/artifact-dispositions.js +234 -0
  25. package/dist/assets.d.ts +54 -0
  26. package/dist/assets.js +89 -0
  27. package/dist/backend.d.ts +41 -0
  28. package/dist/backend.js +29 -0
  29. package/dist/background-replay.d.ts +115 -0
  30. package/dist/background-replay.js +175 -0
  31. package/dist/buyer-references.d.ts +69 -0
  32. package/dist/buyer-references.js +154 -0
  33. package/dist/cloudflare-assets.d.ts +48 -0
  34. package/dist/cloudflare-assets.js +105 -0
  35. package/dist/cloudflare.d.ts +254 -0
  36. package/dist/cloudflare.js +1619 -0
  37. package/dist/effect.d.ts +73 -0
  38. package/dist/effect.js +325 -0
  39. package/dist/git-representation.d.ts +13 -0
  40. package/dist/git-representation.js +16 -0
  41. package/dist/inbox.d.ts +132 -0
  42. package/dist/inbox.js +81 -0
  43. package/dist/index.d.ts +31 -0
  44. package/dist/index.js +85 -0
  45. package/dist/internal/app-description.d.ts +14 -0
  46. package/dist/internal/app-description.js +98 -0
  47. package/dist/internal/app-release-artifact-reader.d.ts +26 -0
  48. package/dist/internal/app-release-artifact-reader.js +1 -0
  49. package/dist/internal/app-release-contract.d.ts +540 -0
  50. package/dist/internal/app-release-contract.js +169 -0
  51. package/dist/internal/app-release-schema.d.ts +1676 -0
  52. package/dist/internal/app-release-schema.js +386 -0
  53. package/dist/internal/app-release-store.d.ts +47 -0
  54. package/dist/internal/app-release-store.js +1 -0
  55. package/dist/internal/background-sync.d.ts +7 -0
  56. package/dist/internal/background-sync.js +10 -0
  57. package/dist/internal/deterministic-memory-app-release-store.d.ts +14 -0
  58. package/dist/internal/deterministic-memory-app-release-store.js +319 -0
  59. package/dist/internal/failure.d.ts +2 -0
  60. package/dist/internal/failure.js +9 -0
  61. package/dist/internal/immutable-release-material.d.ts +3 -0
  62. package/dist/internal/immutable-release-material.js +13 -0
  63. package/dist/internal/promise-app-release-store-adapter.d.ts +9 -0
  64. package/dist/internal/promise-app-release-store-adapter.js +65 -0
  65. package/dist/internal/promise-artifact-reader-adapter.d.ts +9 -0
  66. package/dist/internal/promise-artifact-reader-adapter.js +18 -0
  67. package/dist/internal/public-route-sql.d.ts +10 -0
  68. package/dist/internal/public-route-sql.js +239 -0
  69. package/dist/internal/public-website-authority.d.ts +338 -0
  70. package/dist/internal/public-website-authority.js +50 -0
  71. package/dist/internal/public-website-delivery.d.ts +59 -0
  72. package/dist/internal/public-website-delivery.js +232 -0
  73. package/dist/internal/public-website-fetch.d.ts +8 -0
  74. package/dist/internal/public-website-fetch.js +54 -0
  75. package/dist/internal/release-transition-material.d.ts +3 -0
  76. package/dist/internal/release-transition-material.js +11 -0
  77. package/dist/internal/verified-artifact-snapshot.d.ts +41 -0
  78. package/dist/internal/verified-artifact-snapshot.js +91 -0
  79. package/dist/public-route-moderation.d.ts +83 -0
  80. package/dist/public-route-moderation.js +236 -0
  81. package/dist/public-route-policy.d.ts +51 -0
  82. package/dist/public-route-policy.js +88 -0
  83. package/dist/public-routes.d.ts +34 -0
  84. package/dist/public-routes.js +136 -0
  85. package/dist/publisher.d.ts +61 -0
  86. package/dist/publisher.js +16 -0
  87. package/dist/safety-takedown.d.ts +56 -0
  88. package/dist/safety-takedown.js +146 -0
  89. package/dist/seller-closure-notice.d.ts +14 -0
  90. package/dist/seller-closure-notice.js +14 -0
  91. package/dist/seller-closure.d.ts +15 -0
  92. package/dist/seller-closure.js +31 -0
  93. package/dist/testing.d.ts +8 -0
  94. package/dist/testing.js +47 -0
  95. package/docs/api/README.md +26 -0
  96. package/docs/api/app-backend-binding-vocabulary.md +276 -0
  97. package/docs/api/app-backend-bindings.md +141 -0
  98. package/docs/api/app-event-facts.md +110 -0
  99. package/docs/api/app-method-context.md +166 -0
  100. package/docs/api/app-method-runtime.md +330 -0
  101. package/docs/api/backend.md +108 -0
  102. package/docs/api/background-replay.md +516 -0
  103. package/docs/api/cloudflare.md +1044 -0
  104. package/docs/api/effect.md +2429 -0
  105. package/docs/api/git-representation.md +56 -0
  106. package/docs/api/inbox.md +289 -0
  107. package/docs/api/index.md +2868 -0
  108. package/docs/api/publisher.md +147 -0
  109. package/docs/api/testing.md +31 -0
  110. package/package.json +158 -3
@@ -0,0 +1,147 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/puffball**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/puffball](README.md) / publisher
8
+
9
+ # publisher
10
+
11
+ ## Type Aliases
12
+
13
+ ### TeamAppTemplateSeed
14
+
15
+ ```ts
16
+ type TeamAppTemplateSeed = Readonly<{
17
+ appId: AppId;
18
+ revision: SourceRevision;
19
+ }>;
20
+ ```
21
+
22
+ Exact first-party platform seed from which a Team-owned App was forked.
23
+
24
+ ---
25
+
26
+ ### AppSourceRepository
27
+
28
+ ```ts
29
+ type AppSourceRepository = Schema.Schema.Type<typeof appSourceRepositorySchema>;
30
+ ```
31
+
32
+ Parsed immutable source location used to build one App.
33
+
34
+ ---
35
+
36
+ ### TeamAppPublisherRegistration
37
+
38
+ ```ts
39
+ type TeamAppPublisherRegistration = Schema.Schema.Type<
40
+ typeof teamAppPublisherRegistrationSchema
41
+ >;
42
+ ```
43
+
44
+ Parsed Team ownership record for one App publisher.
45
+
46
+ ---
47
+
48
+ ### TeamAppPublisherRegistrationRead
49
+
50
+ ```ts
51
+ type TeamAppPublisherRegistrationRead =
52
+ | Readonly<{
53
+ kind: "found";
54
+ registration: TeamAppPublisherRegistration;
55
+ }>
56
+ | Readonly<{
57
+ kind: "absent";
58
+ }>;
59
+ ```
60
+
61
+ Result of reading the durable publisher registered for an App.
62
+
63
+ ---
64
+
65
+ ### TeamAppPublisherRegistrationCreate
66
+
67
+ ```ts
68
+ type TeamAppPublisherRegistrationCreate =
69
+ | Readonly<{
70
+ kind: "created" | "existing";
71
+ registration: TeamAppPublisherRegistration;
72
+ }>
73
+ | Readonly<{
74
+ kind: "conflict";
75
+ }>;
76
+ ```
77
+
78
+ Idempotent result of registering one App publisher.
79
+
80
+ ---
81
+
82
+ ### TeamAppPublicationAuthorization
83
+
84
+ ```ts
85
+ type TeamAppPublicationAuthorization =
86
+ | Readonly<{
87
+ kind: "authorized";
88
+ registration: TeamAppPublisherRegistration;
89
+ }>
90
+ | Readonly<{
91
+ kind: "absent" | "denied";
92
+ }>;
93
+ ```
94
+
95
+ Team-scoped decision for publishing a registered App.
96
+
97
+ ---
98
+
99
+ ### TeamAppPublisherRegistry
100
+
101
+ ```ts
102
+ type TeamAppPublisherRegistry = Readonly<{
103
+ read: Promise<TeamAppPublisherRegistrationRead>;
104
+ register: Promise<TeamAppPublisherRegistrationCreate>;
105
+ authorize: Promise<TeamAppPublicationAuthorization>;
106
+ }>;
107
+ ```
108
+
109
+ Durable App publisher facts; Team membership remains owned by Hub.
110
+
111
+ ## Variables
112
+
113
+ ### appSourceRepositorySchema
114
+
115
+ ```ts
116
+ const appSourceRepositorySchema: Struct<{
117
+ provider: Literals<readonly ["artifacts", "github"]>;
118
+ repository: String;
119
+ branch: Literal<"main">;
120
+ }>;
121
+ ```
122
+
123
+ Canonical source repository resolved by the product publisher.
124
+
125
+ ---
126
+
127
+ ### teamAppPublisherRegistrationSchema
128
+
129
+ ```ts
130
+ const teamAppPublisherRegistrationSchema: Struct<{
131
+ appId: refine<AppId, String>;
132
+ teamId: String;
133
+ source: Struct<{
134
+ provider: Literals<readonly ["artifacts", "github"]>;
135
+ repository: String;
136
+ branch: Literal<"main">;
137
+ }>;
138
+ templateSeed: optionalKey<
139
+ Struct<{
140
+ appId: refine<AppId, String>;
141
+ revision: refine<SourceRevision, String>;
142
+ }>
143
+ >;
144
+ }>;
145
+ ```
146
+
147
+ Team-owned publication authority for one separately registered App.
@@ -0,0 +1,31 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/puffball**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/puffball](README.md) / testing
8
+
9
+ # testing
10
+
11
+ ## Functions
12
+
13
+ ### sqliteD1()
14
+
15
+ ```ts
16
+ function sqliteD1(sqlite): AppReleaseD1Database;
17
+ ```
18
+
19
+ Adapt caller-owned Node SQLite to the catalog's D1 transport for tests and quick
20
+ starts. The caller applies schema and closes the database. This is not a
21
+ Cloudflare emulator or an isolation boundary.
22
+
23
+ #### Parameters
24
+
25
+ | Parameter | Type |
26
+ | --------- | -------------- |
27
+ | `sqlite` | `DatabaseSync` |
28
+
29
+ #### Returns
30
+
31
+ [`AppReleaseD1Database`](cloudflare.md#appreleased1database)
package/package.json CHANGED
@@ -1,6 +1,161 @@
1
1
  {
2
2
  "name": "@fungi.computer/puffball",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "author": "Levi <levi@technomancy.dev>",
5
+ "description": "Immutable App/Release catalog with verified public website delivery",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./effect": {
15
+ "types": "./dist/effect.d.ts",
16
+ "import": "./dist/effect.js"
17
+ },
18
+ "./cloudflare": {
19
+ "types": "./dist/cloudflare.d.ts",
20
+ "import": "./dist/cloudflare.js"
21
+ },
22
+ "./app": {
23
+ "types": "./dist/app.d.ts",
24
+ "import": "./dist/app.js"
25
+ },
26
+ "./backend": {
27
+ "types": "./dist/backend.d.ts",
28
+ "import": "./dist/backend.js"
29
+ },
30
+ "./assets": {
31
+ "types": "./dist/assets.d.ts",
32
+ "import": "./dist/assets.js"
33
+ },
34
+ "./cloudflare-assets": {
35
+ "types": "./dist/cloudflare-assets.d.ts",
36
+ "import": "./dist/cloudflare-assets.js"
37
+ },
38
+ "./buyer-references": {
39
+ "types": "./dist/buyer-references.d.ts",
40
+ "import": "./dist/buyer-references.js"
41
+ },
42
+ "./safety-takedown": {
43
+ "types": "./dist/safety-takedown.d.ts",
44
+ "import": "./dist/safety-takedown.js"
45
+ },
46
+ "./public-route-moderation": {
47
+ "types": "./dist/public-route-moderation.d.ts",
48
+ "import": "./dist/public-route-moderation.js"
49
+ },
50
+ "./app-origin-paths": {
51
+ "types": "./dist/app-origin-paths.d.ts",
52
+ "import": "./dist/app-origin-paths.js"
53
+ },
54
+ "./public-routes": {
55
+ "types": "./dist/public-routes.d.ts",
56
+ "import": "./dist/public-routes.js"
57
+ },
58
+ "./public-route-policy": {
59
+ "types": "./dist/public-route-policy.d.ts",
60
+ "import": "./dist/public-route-policy.js"
61
+ },
62
+ "./publisher": {
63
+ "types": "./dist/publisher.d.ts",
64
+ "import": "./dist/publisher.js"
65
+ },
66
+ "./artifact-dispositions": {
67
+ "types": "./dist/artifact-dispositions.d.ts",
68
+ "import": "./dist/artifact-dispositions.js"
69
+ },
70
+ "./seller-closure-notice": {
71
+ "types": "./dist/seller-closure-notice.d.ts",
72
+ "import": "./dist/seller-closure-notice.js"
73
+ },
74
+ "./seller-closure": {
75
+ "types": "./dist/seller-closure.d.ts",
76
+ "import": "./dist/seller-closure.js"
77
+ },
78
+ "./app-method-runtime": {
79
+ "types": "./dist/app-method-runtime.d.ts",
80
+ "import": "./dist/app-method-runtime.js"
81
+ },
82
+ "./testing": {
83
+ "types": "./dist/testing.d.ts",
84
+ "import": "./dist/testing.js"
85
+ },
86
+ "./git-representation": {
87
+ "types": "./dist/git-representation.d.ts",
88
+ "import": "./dist/git-representation.js"
89
+ },
90
+ "./app-event-facts": {
91
+ "types": "./dist/app-event-facts.d.ts",
92
+ "import": "./dist/app-event-facts.js"
93
+ },
94
+ "./inbox": {
95
+ "types": "./dist/inbox.d.ts",
96
+ "import": "./dist/inbox.js"
97
+ },
98
+ "./background-replay": {
99
+ "types": "./dist/background-replay.d.ts",
100
+ "import": "./dist/background-replay.js"
101
+ }
102
+ },
103
+ "files": [
104
+ "dist",
105
+ "docs/api",
106
+ "README.md",
107
+ "LICENSE"
108
+ ],
109
+ "dependencies": {
110
+ "@fungi.computer/cairn": "0.0.1",
111
+ "effect": "4.0.2",
112
+ "@fungi.computer/cloudflare-worker-bundler": "0.2.3-fungi.0",
113
+ "zod": "4.4.3",
114
+ "@fungi.computer/watchdog": "0.0.1",
115
+ "@fungi.computer/gills": "0.0.1"
116
+ },
117
+ "devDependencies": {
118
+ "@cloudflare/vitest-plugin": "1.1.2",
119
+ "@types/node": "24.13.3",
120
+ "typescript": "5.9.3",
121
+ "vitest": "4.1.11",
122
+ "@cloudflare/workers-types": "5.20260828.1"
123
+ },
124
+ "botanical": {
125
+ "role": "package",
126
+ "operations": {
127
+ "lint": "required",
128
+ "typecheck": "required",
129
+ "build": "required",
130
+ "test": "required",
131
+ "docs": "required",
132
+ "pack": "required",
133
+ "smoke": "required",
134
+ "stranger": "required"
135
+ }
136
+ },
137
+ "license": "MIT",
138
+ "repository": {
139
+ "type": "git",
140
+ "url": "git+https://github.com/fungi-computer/puffball.git"
141
+ },
142
+ "scripts": {
143
+ "lint": "eslint --global URL --global TextEncoder src test examples --max-warnings=0 && ../../node_modules/.bin/oxlint --config ../../oxlint.config.ts --deny-warnings src test examples",
144
+ "typecheck": "tsc -p tsconfig.json --noEmit",
145
+ "build": "pnpm run clean && tsc -p tsconfig.build.json",
146
+ "clean": "node --input-type=module --eval \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
147
+ "test": "vitest run --config vitest.node.config.ts && vitest run --config vitest.cloudflare.config.ts && vitest run --config vitest.cloudflare.restart.config.ts && vitest run --config vitest.cloudflare.transition.config.ts && vitest run --config vitest.cloudflare.transition-storage.config.ts && vitest run --config vitest.cloudflare.transition-lifecycle.config.ts && vitest run --config vitest.cloudflare.transition-idempotency.config.ts && vitest run --config vitest.cloudflare.a1-2.config.ts && vitest run --config vitest.cloudflare.public-routes.config.ts",
148
+ "test:cloudflare": "../../node_modules/.bin/vitest run --config vitest.cloudflare.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.restart.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.transition.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.transition-storage.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.transition-lifecycle.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.transition-idempotency.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.a1-2.config.ts && ../../node_modules/.bin/vitest run --config vitest.cloudflare.public-routes.config.ts",
149
+ "docs": "tsx ../../tooling/repository/src/docs/cli.ts check --root ../..",
150
+ "docs:write": "tsx ../../tooling/repository/src/docs/cli.ts write --root ../..",
151
+ "pack": "mkdir -p ../../.botanical/puffball-pack && pnpm pack --pack-destination ../../.botanical/puffball-pack",
152
+ "smoke": "node --input-type=module -e \"import('./dist/index.js').then(({createAppReleaseCatalog}) => { if (typeof createAppReleaseCatalog !== 'function') process.exit(1); })\"",
153
+ "stranger": "tsx ../../tooling/repository/src/artifacts/cli.ts --repo-root ../.. .",
154
+ "demo:a1.2": "node --import tsx examples/a1-2-public-website.ts",
155
+ "demo:a1.2:self-check": "node --import tsx examples/a1-2-public-website.ts --self-check",
156
+ "format:check": "node ../../tooling/repository/scripts/format-package-check.mjs",
157
+ "lint:anti-slop": "node ../../tooling/repository/scripts/lint-package-anti-slop.mjs",
158
+ "test:unit": "../../node_modules/.bin/vitest run --config vitest.node.config.ts",
159
+ "test:merge": "pnpm run test:cloudflare"
160
+ }
6
161
  }