@manifesto-ai/sdk 0.1.0 → 1.2.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/README.md +29 -104
- package/dist/__tests__/bootstrap.test.js +13 -14
- package/dist/__tests__/bootstrap.test.js.map +1 -1
- package/dist/__tests__/public-exports.test.d.ts +2 -0
- package/dist/__tests__/public-exports.test.d.ts.map +1 -0
- package/dist/__tests__/public-exports.test.js +58 -0
- package/dist/__tests__/public-exports.test.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,66 +1,31 @@
|
|
|
1
1
|
# @manifesto-ai/sdk
|
|
2
2
|
|
|
3
|
-
> **SDK** is the public developer API
|
|
4
|
-
|
|
5
|
-
> **Phase 1 Notice:** During the current phase, most users should install `@manifesto-ai/app`, which re-exports all SDK APIs. See [ADR-007](../../docs/internals/adr/007-sdk-runtime-split-kickoff.md) for details.
|
|
3
|
+
> **SDK** is the canonical public developer API for Manifesto applications.
|
|
6
4
|
|
|
7
5
|
---
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## Overview
|
|
10
8
|
|
|
11
|
-
SDK owns the public contract
|
|
9
|
+
SDK owns the public contract for app creation and interaction.
|
|
10
|
+
It provides `createApp()`, `createTestApp()`, `ManifestoApp`, and the hook primitives while delegating orchestration to Runtime.
|
|
12
11
|
|
|
13
|
-
```
|
|
12
|
+
```text
|
|
14
13
|
Application Code
|
|
15
14
|
|
|
|
16
15
|
v
|
|
17
|
-
|
|
16
|
+
SDK (createApp, App, Hooks)
|
|
18
17
|
|
|
|
19
18
|
v
|
|
20
|
-
|
|
19
|
+
Runtime (orchestration)
|
|
21
20
|
|
|
|
22
21
|
v
|
|
23
|
-
|
|
22
|
+
Core / Host / World
|
|
24
23
|
```
|
|
25
24
|
|
|
26
25
|
---
|
|
27
26
|
|
|
28
|
-
## What SDK Does
|
|
29
|
-
|
|
30
|
-
| Responsibility | Description |
|
|
31
|
-
|----------------|-------------|
|
|
32
|
-
| App factory | `createApp(config)` — single entry point for creating apps |
|
|
33
|
-
| App interface | `ManifestoApp` — thin facade over Runtime |
|
|
34
|
-
| Lifecycle | `ready()` / `dispose()` with status tracking |
|
|
35
|
-
| Hook system | Observable lifecycle with re-entrancy guards |
|
|
36
|
-
| AppRef | Read-only facade for safe hook access |
|
|
37
|
-
| Job queue | Deferred execution for hook-triggered actions |
|
|
38
|
-
| Test helper | `createTestApp()` — minimal app for testing |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## What SDK Does NOT Do
|
|
43
|
-
|
|
44
|
-
| NOT Responsible For | Who Is |
|
|
45
|
-
|--------------------|--------|
|
|
46
|
-
| Execution orchestration | Runtime |
|
|
47
|
-
| Effect execution | Host (via Runtime) |
|
|
48
|
-
| Pure state computation | Core (via Runtime) |
|
|
49
|
-
| Governance and lineage | World (via Runtime) |
|
|
50
|
-
| Type/error definitions | Runtime |
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
27
|
## Installation
|
|
55
28
|
|
|
56
|
-
During **Phase 1**, use `@manifesto-ai/app` as the canonical entry point:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
pnpm add @manifesto-ai/app
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
For direct SDK access (preview):
|
|
63
|
-
|
|
64
29
|
```bash
|
|
65
30
|
pnpm add @manifesto-ai/sdk
|
|
66
31
|
```
|
|
@@ -75,105 +40,65 @@ import { createApp } from "@manifesto-ai/sdk";
|
|
|
75
40
|
const app = createApp({
|
|
76
41
|
schema: counterSchema,
|
|
77
42
|
effects: {
|
|
78
|
-
"api.save": async (params
|
|
43
|
+
"api.save": async (params) => [
|
|
79
44
|
{ op: "set", path: "data.savedAt", value: params.timestamp },
|
|
80
45
|
],
|
|
81
46
|
},
|
|
82
47
|
});
|
|
83
48
|
|
|
84
49
|
await app.ready();
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
await handle.completed();
|
|
88
|
-
|
|
89
|
-
console.log(app.getState().data.count); // 1
|
|
50
|
+
await app.act("increment").done();
|
|
51
|
+
console.log(app.getState().data.count);
|
|
90
52
|
```
|
|
91
53
|
|
|
92
54
|
---
|
|
93
55
|
|
|
94
|
-
##
|
|
56
|
+
## Main Exports
|
|
95
57
|
|
|
96
|
-
### Factory
|
|
58
|
+
### Factory
|
|
97
59
|
|
|
98
60
|
```typescript
|
|
99
61
|
function createApp(config: AppConfig): App;
|
|
100
62
|
function createTestApp(domain: DomainSchema | string, opts?: Partial<AppConfig>): App;
|
|
101
63
|
```
|
|
102
64
|
|
|
103
|
-
###
|
|
65
|
+
### Class
|
|
104
66
|
|
|
105
67
|
```typescript
|
|
106
|
-
|
|
107
|
-
// Lifecycle
|
|
108
|
-
ready(): Promise<void>;
|
|
109
|
-
dispose(opts?): Promise<void>;
|
|
110
|
-
readonly status: AppStatus;
|
|
111
|
-
readonly hooks: Hookable<AppHooks>;
|
|
112
|
-
|
|
113
|
-
// Schema
|
|
114
|
-
getDomainSchema(): DomainSchema;
|
|
115
|
-
|
|
116
|
-
// Actions
|
|
117
|
-
act(type: string, input?: unknown, opts?): ActionHandle;
|
|
118
|
-
submitProposal(proposal): Promise<ProposalResult>;
|
|
119
|
-
|
|
120
|
-
// State
|
|
121
|
-
getState<T>(): AppState<T>;
|
|
122
|
-
subscribe(selector, listener, opts?): () => void;
|
|
123
|
-
getSnapshot(): Snapshot;
|
|
124
|
-
|
|
125
|
-
// Session
|
|
126
|
-
session(actorId: string, opts?): Session;
|
|
127
|
-
|
|
128
|
-
// Branch
|
|
129
|
-
currentBranch(): Branch;
|
|
130
|
-
listBranches(): Branch[];
|
|
131
|
-
switchBranch(branchId): Promise<void>;
|
|
132
|
-
fork(opts?): Promise<Branch>;
|
|
133
|
-
|
|
134
|
-
// World Query
|
|
135
|
-
getCurrentHead(): WorldId;
|
|
136
|
-
getWorld(worldId?): World;
|
|
137
|
-
}
|
|
68
|
+
class ManifestoApp implements App { /* ... */ }
|
|
138
69
|
```
|
|
139
70
|
|
|
140
|
-
|
|
71
|
+
### Runtime-Reexported Public Types/Errors
|
|
72
|
+
|
|
73
|
+
SDK re-exports public contract types and errors (for example `AppConfig`, `AppState`, `ActionHandle`, `AppNotReadyError`).
|
|
141
74
|
|
|
142
75
|
---
|
|
143
76
|
|
|
144
77
|
## Relationship with Other Packages
|
|
145
78
|
|
|
146
|
-
```
|
|
147
|
-
App (facade) -> SDK -> Runtime -> Core / Host / World
|
|
148
|
-
```
|
|
149
|
-
|
|
150
79
|
| Relationship | Package | How |
|
|
151
80
|
|--------------|---------|-----|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
81
|
+
| Delegates to | `@manifesto-ai/runtime` | All orchestration via runtime pipeline |
|
|
82
|
+
| Uses | `@manifesto-ai/core` | Schema and expression types |
|
|
83
|
+
| Uses | `@manifesto-ai/world` | World protocol types |
|
|
84
|
+
| Legacy predecessor | App facade package | Removed in R2 (see API retirement record) |
|
|
156
85
|
|
|
157
86
|
---
|
|
158
87
|
|
|
159
|
-
##
|
|
88
|
+
## Migration from Legacy App Facade
|
|
160
89
|
|
|
161
|
-
|
|
90
|
+
Legacy app-facade imports should be replaced with `@manifesto-ai/sdk`.
|
|
162
91
|
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
- Creating framework-specific wrappers (React, Vue, etc.)
|
|
166
|
-
- After Phase 2 transition when SDK becomes the primary entry point
|
|
92
|
+
For automated rewrite guidance, see:
|
|
93
|
+
- [docs/guides/migrate-app-to-sdk.md](../../docs/guides/migrate-app-to-sdk.md)
|
|
167
94
|
|
|
168
95
|
---
|
|
169
96
|
|
|
170
97
|
## Documentation
|
|
171
98
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
| [VERSION-INDEX.md](docs/VERSION-INDEX.md) | Version history and reading guide |
|
|
176
|
-
| [ADR-007](../../docs/internals/adr/007-sdk-runtime-split-kickoff.md) | Split rationale |
|
|
99
|
+
- [sdk-SPEC-v0.1.0.md](docs/sdk-SPEC-v0.1.0.md)
|
|
100
|
+
- [VERSION-INDEX.md](docs/VERSION-INDEX.md)
|
|
101
|
+
- [ADR-008](../../docs/internals/adr/008-sdk-first-transition-and-app-retirement.md)
|
|
177
102
|
|
|
178
103
|
---
|
|
179
104
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import * as sdk from '../index.js';
|
|
2
3
|
describe('@manifesto-ai/sdk bootstrap', () => {
|
|
3
4
|
it('SdkManifest type is importable and structurally correct', () => {
|
|
4
5
|
// Type-level verification: the manifest type constrains to expected shape
|
|
@@ -11,24 +12,22 @@ describe('@manifesto-ai/sdk bootstrap', () => {
|
|
|
11
12
|
expect(manifest.specVersion).toBe('0.1.0');
|
|
12
13
|
expect(manifest.phase).toBe('bootstrap');
|
|
13
14
|
});
|
|
14
|
-
it('package entry point resolves without error',
|
|
15
|
-
|
|
16
|
-
expect(mod).toBeDefined();
|
|
15
|
+
it('package entry point resolves without error', () => {
|
|
16
|
+
expect(sdk).toBeDefined();
|
|
17
17
|
});
|
|
18
|
-
it('exports SDK components',
|
|
19
|
-
const mod = await import('../index.js');
|
|
18
|
+
it('exports SDK components', () => {
|
|
20
19
|
// App Factory
|
|
21
|
-
expect(
|
|
22
|
-
expect(
|
|
20
|
+
expect(sdk.createApp).toBeDefined();
|
|
21
|
+
expect(sdk.createTestApp).toBeDefined();
|
|
23
22
|
// ManifestoApp
|
|
24
|
-
expect(
|
|
23
|
+
expect(sdk.ManifestoApp).toBeDefined();
|
|
25
24
|
// Hooks
|
|
26
|
-
expect(
|
|
27
|
-
expect(
|
|
28
|
-
expect(
|
|
29
|
-
expect(
|
|
30
|
-
expect(
|
|
31
|
-
expect(
|
|
25
|
+
expect(sdk.AppRefImpl).toBeDefined();
|
|
26
|
+
expect(sdk.createAppRef).toBeDefined();
|
|
27
|
+
expect(sdk.HookableImpl).toBeDefined();
|
|
28
|
+
expect(sdk.JobQueue).toBeDefined();
|
|
29
|
+
expect(sdk.HookContextImpl).toBeDefined();
|
|
30
|
+
expect(sdk.createHookContext).toBeDefined();
|
|
32
31
|
});
|
|
33
32
|
});
|
|
34
33
|
//# sourceMappingURL=bootstrap.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.test.js","sourceRoot":"","sources":["../../src/__tests__/bootstrap.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.test.js","sourceRoot":"","sources":["../../src/__tests__/bootstrap.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAGnC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,0EAA0E;QAC1E,MAAM,QAAQ,GAAgB;YAC5B,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,OAAO;YACpB,KAAK,EAAE,WAAW;SACnB,CAAC;QAEF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAChD,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,cAAc;QACd,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE,CAAC;QAExC,eAAe;QACf,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QAEvC,QAAQ;QACR,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-exports.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/public-exports.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import * as sdk from '../index.js';
|
|
3
|
+
describe('sdk public exports contract', () => {
|
|
4
|
+
it('exposes the expected runtime value exports only', () => {
|
|
5
|
+
const exportedKeys = Object.keys(sdk).sort();
|
|
6
|
+
const expectedKeys = [
|
|
7
|
+
'ActionFailedError',
|
|
8
|
+
'ActionNotFoundError',
|
|
9
|
+
'ActionPreparationError',
|
|
10
|
+
'ActionRejectedError',
|
|
11
|
+
'ActionTimeoutError',
|
|
12
|
+
'AppDisposedError',
|
|
13
|
+
'AppNotReadyError',
|
|
14
|
+
'AppRefImpl',
|
|
15
|
+
'BranchHeadNotFoundError',
|
|
16
|
+
'BranchNotFoundError',
|
|
17
|
+
'DomainCompileError',
|
|
18
|
+
'HandleDetachedError',
|
|
19
|
+
'HookContextImpl',
|
|
20
|
+
'HookMutationError',
|
|
21
|
+
'HookableImpl',
|
|
22
|
+
'JobQueue',
|
|
23
|
+
'ManifestoApp',
|
|
24
|
+
'ManifestoAppError',
|
|
25
|
+
'MemoryDisabledError',
|
|
26
|
+
'MissingDefaultActorError',
|
|
27
|
+
'PluginInitError',
|
|
28
|
+
'ReservedEffectTypeError',
|
|
29
|
+
'ReservedNamespaceError',
|
|
30
|
+
'SchemaMismatchOnResumeError',
|
|
31
|
+
'SystemActionDisabledError',
|
|
32
|
+
'SystemActionRoutingError',
|
|
33
|
+
'WorldNotFoundError',
|
|
34
|
+
'WorldNotInLineageError',
|
|
35
|
+
'WorldSchemaHashMismatchError',
|
|
36
|
+
'createApp',
|
|
37
|
+
'createAppRef',
|
|
38
|
+
'createHookContext',
|
|
39
|
+
'createTestApp',
|
|
40
|
+
].sort();
|
|
41
|
+
expect(exportedKeys).toEqual(expectedKeys);
|
|
42
|
+
});
|
|
43
|
+
it('does not expose non-contract helpers from former app facade', () => {
|
|
44
|
+
const forbidden = [
|
|
45
|
+
'createSilentPolicyService',
|
|
46
|
+
'createStrictPolicyService',
|
|
47
|
+
'createDefaultPolicyService',
|
|
48
|
+
'createInMemoryWorldStore',
|
|
49
|
+
'withDxAliases',
|
|
50
|
+
'validateSchemaCompatibility',
|
|
51
|
+
'withPlatformNamespaces',
|
|
52
|
+
];
|
|
53
|
+
for (const key of forbidden) {
|
|
54
|
+
expect(sdk[key]).toBeUndefined();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=public-exports.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-exports.test.js","sourceRoot":"","sources":["../../src/__tests__/public-exports.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAE7C,MAAM,YAAY,GAAG;YACnB,mBAAmB;YACnB,qBAAqB;YACrB,wBAAwB;YACxB,qBAAqB;YACrB,oBAAoB;YACpB,kBAAkB;YAClB,kBAAkB;YAClB,YAAY;YACZ,yBAAyB;YACzB,qBAAqB;YACrB,oBAAoB;YACpB,qBAAqB;YACrB,iBAAiB;YACjB,mBAAmB;YACnB,cAAc;YACd,UAAU;YACV,cAAc;YACd,mBAAmB;YACnB,qBAAqB;YACrB,0BAA0B;YAC1B,iBAAiB;YACjB,yBAAyB;YACzB,wBAAwB;YACxB,6BAA6B;YAC7B,2BAA2B;YAC3B,0BAA0B;YAC1B,oBAAoB;YACpB,wBAAwB;YACxB,8BAA8B;YAC9B,WAAW;YACX,cAAc;YACd,mBAAmB;YACnB,eAAe;SAChB,CAAC,IAAI,EAAE,CAAC;QAET,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,SAAS,GAAG;YAChB,2BAA2B;YAC3B,2BAA2B;YAC3B,4BAA4B;YAC5B,0BAA0B;YAC1B,eAAe;YACf,6BAA6B;YAC7B,wBAAwB;SACzB,CAAC;QAEF,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;YAC5B,MAAM,CAAE,GAA+B,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QAChE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @manifesto-ai/sdk
|
|
2
|
+
* @manifesto-ai/sdk v1.0.0
|
|
3
3
|
*
|
|
4
4
|
* Public developer API layer for the Manifesto protocol stack.
|
|
5
|
+
* Canonical entry point since Phase 2 (ADR-008).
|
|
5
6
|
*
|
|
6
7
|
* @see sdk-SPEC-v0.1.0.md
|
|
7
8
|
* @packageDocumentation
|
|
8
9
|
*/
|
|
9
10
|
export type { SdkManifest } from './manifest.js';
|
|
11
|
+
export type { AppStatus, RuntimeKind, Unsubscribe, ActionPhase, ActionResult, CompletedActionResult, RejectedActionResult, FailedActionResult, PreparationFailedActionResult, ExecutionStats, ActionUpdate, ActionUpdateDetail, ActorPolicyConfig, SystemActionsConfig, DisposeOptions, DoneOptions, ActOptions, ForkOptions, SessionOptions, SubscribeOptions, LineageOptions, AppState, SystemState, SnapshotMeta, MemoryHubConfig, BackfillConfig, RecallRequest, RecallResult, MemoryMaintenanceOptions, MigrationLink, MigrationContext, MigrationFn, App, ActionHandle, Branch, Session, MemoryFacade, SystemFacade, SystemMemoryFacade, Hookable, HookContext, EnqueueOptions, AppPlugin, AppHooks, MemoryProvider, MemoryVerifier, MemoryIngestEntry, MemorySelectionView, ProveResult, Requirement, AppConfig, AppRef, Proposal, ProposalResult, ExecutionKey, ExecutionKeyPolicy, ProposalId, ActorId, BranchId, ApprovedScope, AuthorityDecision, PolicyService, ArtifactRef, Intent, SchemaCompatibilityResult, MemoryStore, StoredMemoryRecord, MemoryRecordInput, MemoryFilter, World, WorldId, Snapshot, Patch, WorldHead, Effects, AppEffectContext, EffectHandler, ErrorValue, MelText, } from '@manifesto-ai/runtime';
|
|
12
|
+
export { ManifestoAppError, AppNotReadyError, AppDisposedError, ActionRejectedError, ActionFailedError, ActionPreparationError, ActionTimeoutError, ActionNotFoundError, HandleDetachedError, HookMutationError, ReservedEffectTypeError, SystemActionDisabledError, SystemActionRoutingError, MemoryDisabledError, BranchNotFoundError, WorldNotFoundError, WorldSchemaHashMismatchError, WorldNotInLineageError, ReservedNamespaceError, MissingDefaultActorError, DomainCompileError, PluginInitError, SchemaMismatchOnResumeError, BranchHeadNotFoundError, } from '@manifesto-ai/runtime';
|
|
10
13
|
export { createApp, createTestApp } from './create-app.js';
|
|
11
14
|
export { ManifestoApp } from './app.js';
|
|
12
15
|
export { AppRefImpl, createAppRef } from './hooks/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,YAAY,EAEV,SAAS,EACT,WAAW,EACX,WAAW,EAGX,WAAW,EAGX,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EAGd,YAAY,EACZ,kBAAkB,EAGlB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,cAAc,EAGd,QAAQ,EACR,WAAW,EACX,YAAY,EAGZ,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,wBAAwB,EAGxB,aAAa,EACb,gBAAgB,EAChB,WAAW,EAGX,GAAG,EACH,YAAY,EACZ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,cAAc,EAGd,SAAS,EAGT,QAAQ,EAGR,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EAGX,WAAW,EAGX,SAAS,EACT,MAAM,EACN,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,MAAM,EACN,yBAAyB,EACzB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EAGT,OAAO,EACP,gBAAgB,EAChB,aAAa,EAGb,UAAU,EAGV,OAAO,GACR,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAEL,iBAAiB,EAGjB,gBAAgB,EAChB,gBAAgB,EAGhB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EAGnB,iBAAiB,EAGjB,uBAAuB,EAGvB,yBAAyB,EACzB,wBAAwB,EAGxB,mBAAmB,EAGnB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EAGtB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EAGf,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAM3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAMxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @manifesto-ai/sdk v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* Public developer API layer for the Manifesto protocol stack.
|
|
5
|
+
* Canonical entry point since Phase 2 (ADR-008).
|
|
6
|
+
*
|
|
7
|
+
* @see sdk-SPEC-v0.1.0.md
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
1
10
|
// =============================================================================
|
|
2
|
-
//
|
|
11
|
+
// Public Errors (re-exported from Runtime)
|
|
12
|
+
// =============================================================================
|
|
13
|
+
export {
|
|
14
|
+
// Base
|
|
15
|
+
ManifestoAppError,
|
|
16
|
+
// Lifecycle
|
|
17
|
+
AppNotReadyError, AppDisposedError,
|
|
18
|
+
// Action
|
|
19
|
+
ActionRejectedError, ActionFailedError, ActionPreparationError, ActionTimeoutError, ActionNotFoundError, HandleDetachedError,
|
|
20
|
+
// Hook
|
|
21
|
+
HookMutationError,
|
|
22
|
+
// Effects
|
|
23
|
+
ReservedEffectTypeError,
|
|
24
|
+
// System
|
|
25
|
+
SystemActionDisabledError, SystemActionRoutingError,
|
|
26
|
+
// Memory
|
|
27
|
+
MemoryDisabledError,
|
|
28
|
+
// Branch/World
|
|
29
|
+
BranchNotFoundError, WorldNotFoundError, WorldSchemaHashMismatchError, WorldNotInLineageError,
|
|
30
|
+
// Other
|
|
31
|
+
ReservedNamespaceError, MissingDefaultActorError, DomainCompileError, PluginInitError,
|
|
32
|
+
// Resume & Recovery
|
|
33
|
+
SchemaMismatchOnResumeError, BranchHeadNotFoundError, } from '@manifesto-ai/runtime';
|
|
34
|
+
// =============================================================================
|
|
35
|
+
// App Factory
|
|
3
36
|
// =============================================================================
|
|
4
37
|
export { createApp, createTestApp } from './create-app.js';
|
|
5
38
|
// =============================================================================
|
|
6
|
-
// ManifestoApp
|
|
39
|
+
// ManifestoApp
|
|
7
40
|
// =============================================================================
|
|
8
41
|
export { ManifestoApp } from './app.js';
|
|
9
42
|
// =============================================================================
|
|
10
|
-
//
|
|
43
|
+
// Hook Internals (public for advanced integrations)
|
|
11
44
|
// =============================================================================
|
|
12
45
|
export { AppRefImpl, createAppRef } from './hooks/index.js';
|
|
13
46
|
export { HookableImpl } from './hooks/index.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2HH,gFAAgF;AAChF,2CAA2C;AAC3C,gFAAgF;AAEhF,OAAO;AACL,OAAO;AACP,iBAAiB;AAEjB,YAAY;AACZ,gBAAgB,EAChB,gBAAgB;AAEhB,SAAS;AACT,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB;AAEnB,OAAO;AACP,iBAAiB;AAEjB,UAAU;AACV,uBAAuB;AAEvB,SAAS;AACT,yBAAyB,EACzB,wBAAwB;AAExB,SAAS;AACT,mBAAmB;AAEnB,eAAe;AACf,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB;AAEtB,QAAQ;AACR,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe;AAEf,oBAAoB;AACpB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAE/B,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,gFAAgF;AAChF,oDAAoD;AACpD,gFAAgF;AAEhF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manifesto-ai/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Manifesto SDK - Public developer API layer",
|
|
5
5
|
"author": "eggplantiny <eggplantiny@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@manifesto-ai/core": "2.4.0",
|
|
39
|
-
"@manifesto-ai/runtime": "0.1.
|
|
40
|
-
"@manifesto-ai/world": "2.
|
|
39
|
+
"@manifesto-ai/runtime": "0.1.2",
|
|
40
|
+
"@manifesto-ai/world": "2.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"typescript": "^5.9.3"
|