@maximem/synap-js-sdk 0.3.0 → 0.4.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 (55) hide show
  1. package/MIGRATING.md +147 -0
  2. package/README.md +95 -82
  3. package/bin/synap-js-sdk.js +45 -122
  4. package/dist/anticipation-cache-ARYEEKMU.cjs +10 -0
  5. package/dist/anticipation-cache-ARYEEKMU.cjs.map +1 -0
  6. package/dist/anticipation-cache-BMVF5sXb.d.cts +190 -0
  7. package/dist/anticipation-cache-BMVF5sXb.d.ts +190 -0
  8. package/dist/anticipation-cache-H7HEVWQC.js +10 -0
  9. package/dist/anticipation-cache-H7HEVWQC.js.map +1 -0
  10. package/dist/chunk-5SC3ELNK.js +856 -0
  11. package/dist/chunk-5SC3ELNK.js.map +1 -0
  12. package/dist/chunk-6LDUDKHS.js +832 -0
  13. package/dist/chunk-6LDUDKHS.js.map +1 -0
  14. package/dist/chunk-HR5Y3KXS.cjs +172 -0
  15. package/dist/chunk-HR5Y3KXS.cjs.map +1 -0
  16. package/dist/chunk-QBCVMPGK.js +28 -0
  17. package/dist/chunk-QBCVMPGK.js.map +1 -0
  18. package/dist/chunk-RB57I2IQ.cjs +832 -0
  19. package/dist/chunk-RB57I2IQ.cjs.map +1 -0
  20. package/dist/chunk-T3NZBIV2.js +172 -0
  21. package/dist/chunk-T3NZBIV2.js.map +1 -0
  22. package/dist/chunk-VXRCBMCY.cjs +856 -0
  23. package/dist/chunk-VXRCBMCY.cjs.map +1 -0
  24. package/dist/chunk-ZKOJDUN4.cjs +28 -0
  25. package/dist/chunk-ZKOJDUN4.cjs.map +1 -0
  26. package/dist/env-55ULHNJZ.cjs +11 -0
  27. package/dist/env-55ULHNJZ.cjs.map +1 -0
  28. package/dist/env-QCUKKW36.js +11 -0
  29. package/dist/env-QCUKKW36.js.map +1 -0
  30. package/dist/grpc/index.cjs +87 -0
  31. package/dist/grpc/index.cjs.map +1 -0
  32. package/dist/grpc/index.d.cts +162 -0
  33. package/dist/grpc/index.d.ts +162 -0
  34. package/dist/grpc/index.js +87 -0
  35. package/dist/grpc/index.js.map +1 -0
  36. package/dist/index.cjs +2702 -0
  37. package/dist/index.cjs.map +1 -0
  38. package/dist/index.d.cts +1491 -0
  39. package/dist/index.d.ts +1491 -0
  40. package/dist/index.js +2702 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/stream-client-ME5N5NK4.js +7 -0
  43. package/dist/stream-client-ME5N5NK4.js.map +1 -0
  44. package/dist/stream-client-ZN6ADZBR.cjs +7 -0
  45. package/dist/stream-client-ZN6ADZBR.cjs.map +1 -0
  46. package/package.json +68 -23
  47. package/.env.example +0 -39
  48. package/bridge/synap_bridge.py +0 -768
  49. package/src/bridge-manager.js +0 -262
  50. package/src/errors.js +0 -168
  51. package/src/index.js +0 -13
  52. package/src/runtime.js +0 -161
  53. package/src/setup-typescript.js +0 -161
  54. package/src/synap-client.js +0 -464
  55. package/types/index.d.ts +0 -475
package/MIGRATING.md ADDED
@@ -0,0 +1,147 @@
1
+ # Migrating from 0.3.x to 0.4
2
+
3
+ `@maximem/synap-js-sdk` 0.4 is a **native TypeScript SDK**. It no longer spawns
4
+ a Python subprocess.
5
+
6
+ ## The short version
7
+
8
+ ```bash
9
+ npm install @maximem/synap-js-sdk
10
+ ```
11
+
12
+ Then delete any `npx synap-js-sdk setup` step from your install or CI scripts.
13
+ Most code needs no other change.
14
+
15
+ ## Breaking changes
16
+
17
+ ### There is no setup step
18
+
19
+ 0.3.x had two: `npx synap-js-sdk setup` (built a Python virtualenv) and
20
+ `npx synap-js-sdk setup-ts` (installed `typescript` + `@types/node` and wrote a
21
+ tsconfig). Neither exists in 0.4. Installing the package is the whole
22
+ installation, and types ship inside it.
23
+
24
+ ### Python is no longer required, or used
25
+
26
+ 0.3.x shipped a JSON-RPC bridge: Node spawned a Python interpreter and talked to
27
+ the real SDK over stdin/stdout. That required Python 3.11+ on every host, made
28
+ the package unusable anywhere without a process spawn, and meant every call
29
+ crossed a serialised pipe.
30
+
31
+ 0.4 talks to the API directly.
32
+
33
+ - **Remove** `npx synap-js-sdk setup` from postinstall and CI.
34
+ - `~/.synap-js-sdk/.venv` is now orphaned. It is safe to delete.
35
+ - These environment variables no longer do anything: `SYNAP_JS_SDK_HOME`,
36
+ `SYNAP_PYTHON_BIN`, `SYNAP_PYTHON_BOOTSTRAP`, `SYNAP_PY_SDK_PACKAGE`,
37
+ `SYNAP_PY_SDK_VERSION`.
38
+ - The `synap-js-sdk` command still exists and still exits 0, so an un-updated
39
+ script will not break your build. It prints a notice and does nothing.
40
+
41
+ ### Node 20 is the minimum
42
+
43
+ Node 18 is end-of-life, and `globalThis.crypto` is only unflagged from Node 19.
44
+
45
+ ### `listen()` is now opt-in
46
+
47
+ 0.3.x started a gRPC anticipation stream **automatically** during init. Every
48
+ user had one whether they wanted it or not.
49
+
50
+ In 0.4 you ask for it explicitly. Be aware of what that means for your bill:
51
+ the anticipation stream is what lets the SDK answer some retrievals from a
52
+ locally cached bundle. Without it, those turns become billed cloud fetches. If
53
+ you were relying on that behavior, opt back in.
54
+
55
+ > The stream needs the optional peers: `npm install @grpc/grpc-js
56
+ > @grpc/proto-loader`. It is Node-only. Edge runtimes and Workers cannot host
57
+ > gRPC at all, so importing the SDK there stays safe and only the stream is
58
+ > unavailable.
59
+
60
+ ### The local cache no longer persists across restarts
61
+
62
+ The Python SDK cached to SQLite, so a restarted process kept its cache. The JS
63
+ SDK caches in memory.
64
+
65
+ This is a **billing** change, not only a latency one: a cache miss is a metered
66
+ retrieval. Long-lived servers are largely unaffected. Short-lived processes and
67
+ serverless functions will see more cloud fetches. A pluggable cache backend is
68
+ available if you want to add Redis.
69
+
70
+ ### Deleting by user is gone
71
+
72
+ ```js
73
+ // 0.3.x -- silently did nothing in serverless, and reported success
74
+ await client.deleteMemory({ userId: 'u1' });
75
+
76
+ // 0.4
77
+ await client.memories.delete(memoryId);
78
+ ```
79
+
80
+ The old form tracked memory ids in a process-local dictionary. In any
81
+ serverless or multi-process deployment that dictionary was empty, so the call
82
+ deleted nothing and returned `{ success: true, deletedCount: 0 }`. It now
83
+ throws instead of quietly lying.
84
+
85
+ ### Timestamps are proper ISO-8601
86
+
87
+ The bridge stringified datetimes through Python's `str()`, producing
88
+ `2026-08-12 10:00:00+00:00` -- a space instead of the `T`. Native JS emits
89
+ `2026-08-12T10:00:00+00:00`. This is a fix, but it is still a change if you
90
+ were parsing those strings.
91
+
92
+ ### True concurrency
93
+
94
+ The bridge serialised every call through one pipe. Concurrent calls are now
95
+ genuinely concurrent, which is faster and also means server rate limits the
96
+ pipe used to mask can now be reached. If you fan out hard, cap your own
97
+ concurrency.
98
+
99
+ ## What did NOT change
100
+
101
+ Your call sites, in almost every case.
102
+
103
+ ```js
104
+ // Unchanged
105
+ const ctx = await client.user.context.fetch({ user_id: 'u1', search_query: ['email'] });
106
+ await client.memories.create({ document: 'text', user_id: 'u1' });
107
+ ```
108
+
109
+ - Both the namespaced (`client.user.context.fetch`) and legacy camelCase
110
+ (`client.fetchUserContext`) surfaces still work.
111
+ - **They still return different shapes**, exactly as before: namespaced returns
112
+ raw `snake_case`, camelCase returns normalised `camelCase`. Converging them
113
+ would break one set of callers, so it is deferred.
114
+ - Both `user_id` and `userId` spellings are still accepted everywhere.
115
+ - `client.init()` still exists as a no-op.
116
+
117
+ ## New in 0.4
118
+
119
+ - **Runs where Python could not**: Edge, Workers and browsers, for the HTTP
120
+ paths. Only the gRPC stream is Node-only.
121
+ - **Real types**, generated from the source rather than hand-written.
122
+ - **A typed error taxonomy** mirroring the Python SDK. Every error carries a
123
+ stable `.code`, which is what you should branch on:
124
+
125
+ ```js
126
+ import { isSynapError } from '@maximem/synap-js-sdk';
127
+
128
+ try { await client.memories.create({ document }); }
129
+ catch (e) {
130
+ if (isSynapError(e) && e.code === 'insufficient_credits') { /* top up */ }
131
+ }
132
+ ```
133
+
134
+ Prefer `.code` over `instanceof` at a package boundary: with dual ESM/CJS a
135
+ consumer can end up holding two copies of a class. (`instanceof` is made to
136
+ work across copies too, but `.code` is the documented contract.)
137
+ - **Explicit lifecycle.** Call `await client.shutdown()` when you are done. The
138
+ SDK does not register `process.on('exit')` handlers: they leak a listener per
139
+ client, never fire in Lambda, and `process` does not exist in Workers.
140
+
141
+ ## Staying on 0.3.x
142
+
143
+ ```bash
144
+ npm install @maximem/synap-js-sdk@legacy
145
+ ```
146
+
147
+ 0.3.x remains installable under the `legacy` dist-tag and is not deprecated.
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # @maximem/synap-js-sdk
2
2
 
3
- Node.js wrapper for the Synap Python SDK.
3
+ Native TypeScript SDK for [Synap](https://synap.maximem.ai) context and memory
4
+ management.
4
5
 
5
- ## Prerequisites
6
-
7
- - Node.js 18+
8
- - Python 3.8+
6
+ **No Python required.** 0.4 replaced the Python-subprocess bridge with a native
7
+ client. Upgrading from 0.3.x? See [MIGRATING.md](./MIGRATING.md).
9
8
 
10
9
  ## Install
11
10
 
@@ -13,109 +12,123 @@ Node.js wrapper for the Synap Python SDK.
13
12
  npm install @maximem/synap-js-sdk
14
13
  ```
15
14
 
16
- ## Setup (JS Runtime)
15
+ Requires Node.js 20+. **That is the whole installation.** There is no setup
16
+ command, and TypeScript needs no extra step: types ship in the package.
17
17
 
18
- Install the Python runtime used by the wrapper:
18
+ Verified against TypeScript 5.7 and 7.0 with `moduleResolution` set to `node`,
19
+ `node16`, `nodenext` and `bundler`.
19
20
 
20
- ```bash
21
- npx synap-js-sdk setup --sdk-version 0.2.0
22
- ```
21
+ ## Quick start
23
22
 
24
- If you want the latest Python SDK version, omit `--sdk-version` and pass `--upgrade`.
23
+ ```ts
24
+ import { SynapClient } from '@maximem/synap-js-sdk';
25
25
 
26
- ## Verify Runtime
26
+ const client = new SynapClient({ apiKey: process.env.SYNAP_API_KEY });
27
27
 
28
- macOS/Linux:
29
-
30
- ```bash
31
- ~/.synap-js-sdk/.venv/bin/python -c "import maximem_synap; print(maximem_synap.__version__)"
32
- ```
28
+ // Store
29
+ await client.memories.create({
30
+ document: 'The user prefers aisle seats on long-haul flights.',
31
+ user_id: 'user-123',
32
+ // Optional. Defaults to 'ai-chat-conversation'. It selects the extraction
33
+ // path, so setting it wrongly stores less from the same text.
34
+ document_type: 'ai-chat-conversation',
35
+ });
33
36
 
34
- Windows:
37
+ // Retrieve
38
+ const context = await client.user.context.fetch({
39
+ user_id: 'user-123',
40
+ search_query: ['seat preference'],
41
+ });
35
42
 
36
- ```powershell
37
- $env:USERPROFILE\.synap-js-sdk\.venv\Scripts\python.exe -c "import maximem_synap; print(maximem_synap.__version__)"
43
+ await client.shutdown();
38
44
  ```
39
45
 
40
- ## Required Environment Variable
46
+ ## Scopes
41
47
 
42
- - `SYNAP_API_KEY` (from the Synap dashboard — Instances → Generate API Key)
48
+ Scopes are **client > customer > user**. A narrower request also matches
49
+ broader-scope memories.
43
50
 
44
- The SDK uses the default Synap cloud endpoints automatically. `SYNAP_BASE_URL`,
45
- `SYNAP_GRPC_HOST`, `SYNAP_GRPC_PORT`, and `SYNAP_GRPC_TLS` are only needed for
46
- advanced overrides such as local development or custom environments.
51
+ ```ts
52
+ await client.user.context.fetch({ user_id, customer_id });
53
+ await client.customer.context.fetch({ customer_id });
54
+ await client.client.context.fetch({});
55
+ ```
47
56
 
48
- ## Quick Start (JavaScript)
57
+ `conversation_id` is **not** a scope tier. It groups turns within a scope, and
58
+ narrows a fetch rather than selecting a different one.
49
59
 
50
- ```js
51
- const { createClient } = require('@maximem/synap-js-sdk');
60
+ ## Errors
52
61
 
53
- const synap = createClient({
54
- apiKey: process.env.SYNAP_API_KEY,
55
- });
62
+ Every error carries a stable `.code`. Branch on that rather than on the class,
63
+ because a dual ESM/CJS dependency graph can hand you two copies of the same
64
+ class:
56
65
 
57
- async function run() {
58
- await synap.init();
59
-
60
- await synap.addMemory({
61
- userId: 'user-123',
62
- customerId: 'customer-456',
63
- conversationId: 'conv-123',
64
- messages: [{ role: 'user', content: 'My name is Alex and I live in Austin.' }],
65
- });
66
-
67
- const context = await synap.fetchUserContext({
68
- userId: 'user-123',
69
- customerId: 'customer-456',
70
- conversationId: 'conv-123',
71
- searchQuery: ['Where does the user live?'],
72
- maxResults: 10,
73
- });
74
-
75
- console.log(context.facts);
76
-
77
- const promptContext = await synap.getContextForPrompt({
78
- conversationId: 'conv-123',
79
- style: 'structured',
80
- });
81
-
82
- console.log(promptContext.formattedContext);
83
- await synap.shutdown();
84
- }
66
+ ```ts
67
+ import { isSynapError } from '@maximem/synap-js-sdk';
85
68
 
86
- run().catch(console.error);
69
+ try {
70
+ await client.memories.create({ document, user_id });
71
+ } catch (e) {
72
+ if (!isSynapError(e)) throw e;
73
+ switch (e.code) {
74
+ case 'insufficient_credits': /* top up */ break;
75
+ case 'rate_limit': /* e.retryAfterSeconds */ break;
76
+ case 'authentication': /* bad key */ break;
77
+ default: throw e;
78
+ }
79
+ }
87
80
  ```
88
81
 
89
- ## TypeScript Extension Setup
82
+ Transient errors are retried automatically. Ingestion is deliberately **not**
83
+ retried when a failure leaves the outcome unknown, because a retry would store
84
+ and bill twice.
90
85
 
91
- Add TypeScript support to an existing JS project:
86
+ ## Runtime support
92
87
 
93
- ```bash
94
- npx synap-js-sdk setup-ts
95
- ```
88
+ | Runtime | HTTP context + memories | gRPC anticipation stream |
89
+ |---|---|---|
90
+ | Node.js 20+ | Yes | Yes (opt-in) |
91
+ | Bun | Yes | Unverified |
92
+ | Deno 2 | Yes | Unverified |
93
+ | Vercel Edge | Yes | No |
94
+ | Cloudflare Workers | Yes | No |
95
+ | Browser | Yes (do not ship an API key) | No |
96
96
 
97
- This command can:
98
- - install `typescript` and `@types/node`
99
- - generate `tsconfig.json` (if missing)
100
- - generate `src/synap.ts` typed wrapper (if missing)
97
+ Edge and Workers cannot run gRPC at all: it needs raw TCP and `node:http2`,
98
+ which they do not provide. Bun and Deno have both, so gRPC is plausible on each,
99
+ but **bidirectional streaming has not been tested there**, so those cells stay
100
+ unverified rather than claimed either way.
101
101
 
102
- ## Single-Flow Setup (JS + TS)
102
+ Importing the SDK on Edge is safe: gRPC lives behind the
103
+ `@maximem/synap-js-sdk/grpc` subpath and is only ever loaded lazily.
103
104
 
104
- ```bash
105
- npm install @maximem/synap-js-sdk && npx synap-js-sdk setup --sdk-version 0.2.0 && npx synap-js-sdk setup-ts
106
- ```
105
+ ## Configuration
107
106
 
108
- ## API Notes
107
+ | Option | Default | Notes |
108
+ |---|---|---|
109
+ | `apiKey` | `SYNAP_API_KEY` | Required. |
110
+ | `clientId` | `SYNAP_CLIENT_ID` | Skips a `whoami` round trip. |
111
+ | `baseUrl` | prod | |
112
+ | `heartbeat` | `false` | Keeps the connection warm. Worth it for a long-lived process, pointless in serverless. |
113
+ | `timeouts` | 5s connect / 30s read | |
114
+ | `retryPolicy` | 3 attempts | |
109
115
 
110
- - `addMemory()` now requires `customerId` to match the Python SDK's explicit ingestion scope.
111
- - `fetchUserContext()`, `fetchCustomerContext()`, and `fetchClientContext()` expose the structured Python `ContextResponse` surface in JS/TS.
112
- - `getContextForPrompt()` exposes compacted context plus recent un-compacted messages.
113
- - `searchMemory()` and `getMemories()` remain convenience helpers built on top of user-scoped context fetches.
114
- - Temporal fields are exposed in JS/TS as `eventDate`, `validUntil`, `temporalCategory`, `temporalConfidence`, plus top-level `temporalEvents`.
116
+ Environment flags are read at call time, so you can toggle them at runtime:
117
+ `SYNAP_SDK_CACHE_RECALL_BYPASS`, `SYNAP_SDK_CACHE_HONOR_TTL_HINT`,
118
+ `SYNAP_SDK_CACHE_INVALIDATE_ON_WRITE`, `SYNAP_SDK_CACHE_COVERAGE_MIN`,
119
+ `SYNAP_SDK_CACHE_MAX_ENTRY_AGE`.
115
120
 
116
- ## CLI Commands
121
+ ## Development
117
122
 
118
123
  ```bash
119
- synap-js-sdk setup [options]
120
- synap-js-sdk setup-ts [options]
124
+ npm install
125
+ npm test
126
+ npm run build
127
+ npm run typecheck
128
+ npm run sync-behavior # after changing synap/sdk/CONTRACT/**
121
129
  ```
130
+
131
+ Retrieval behavior (recall-bypass patterns, BM25 thresholds, the stemmer) is
132
+ **not defined in this package**. It lives in `synap/sdk/CONTRACT/`, shared
133
+ byte-identically with the Python SDK, and both SDKs run the same conformance
134
+ corpus. Never edit the vendored copy in `src/behavior/`.
@@ -1,124 +1,47 @@
1
1
  #!/usr/bin/env node
2
-
3
- const { setupPythonRuntime } = require('../src/runtime');
4
- const { setupTypeScriptExtension } = require('../src/setup-typescript');
5
-
6
- function parseArgs(argv) {
7
- const args = { _: [] };
8
-
9
- for (let i = 0; i < argv.length; i += 1) {
10
- const token = argv[i];
11
-
12
- if (!token.startsWith('--')) {
13
- args._.push(token);
14
- continue;
15
- }
16
-
17
- const key = token.slice(2);
18
- const next = argv[i + 1];
19
-
20
- if (!next || next.startsWith('--')) {
21
- args[key] = true;
22
- continue;
23
- }
24
-
25
- args[key] = next;
26
- i += 1;
27
- }
28
-
29
- return args;
2
+ /**
3
+ * Compatibility shim.
4
+ *
5
+ * `npx synap-js-sdk setup` used to build a Python virtualenv and install the
6
+ * Python SDK into it. Since 1.0 the SDK is native TypeScript, so there is
7
+ * nothing to set up.
8
+ *
9
+ * The command is kept, and kept exiting 0, because it appears in published
10
+ * documentation and in customers' postinstall and CI scripts. Removing the
11
+ * binary would turn a no-longer-needed step into a hard failure on upgrade.
12
+ *
13
+ * ESM, not CommonJS: package.json declares "type": "module", so a `require`
14
+ * here would throw ERR_REQUIRE_ESM on every invocation.
15
+ */
16
+
17
+ const [, , command] = process.argv;
18
+
19
+ const NOTE = `
20
+ @maximem/synap-js-sdk 1.x is a native TypeScript SDK. It does not use Python,
21
+ so there is no setup step and this command does nothing.
22
+
23
+ If you are upgrading from 0.3.x:
24
+ - Remove any "npx synap-js-sdk setup" step from your install or CI scripts.
25
+ - ~/.synap-js-sdk/.venv is now orphaned and safe to delete.
26
+ - Node 20 or newer is required.
27
+ - listen() is now opt-in rather than started automatically.
28
+
29
+ See MIGRATING.md in the package for the full list.
30
+ `.trim();
31
+
32
+ switch (command) {
33
+ case 'setup':
34
+ case 'setup-ts':
35
+ case undefined:
36
+ console.log(NOTE);
37
+ break;
38
+ case '--version':
39
+ case '-v':
40
+ console.log(process.env['npm_package_version'] ?? '1.x');
41
+ break;
42
+ default:
43
+ console.log(`Unknown command: ${command}\n\n${NOTE}`);
44
+ // Still exit 0: an unknown subcommand in a legacy script should not break
45
+ // a customer's build on upgrade.
46
+ break;
30
47
  }
31
-
32
- function printHelp() {
33
- console.log(`synap-js-sdk
34
-
35
- Usage:
36
- synap-js-sdk setup [options]
37
- synap-js-sdk setup-ts [options]
38
-
39
- setup options:
40
- --python <bin> Python bootstrap binary (default: python3)
41
- --sdk-home <path> SDK home (default: ~/.synap-js-sdk)
42
- --venv <path> Virtualenv path (default: <sdk-home>/.venv)
43
- --package <name> Python package name (default: maximem-synap)
44
- --sdk-version <ver> Python SDK version to install
45
- --no-deps Install without dependencies
46
- --no-build-isolation Disable pip build isolation
47
- --upgrade Use pip --upgrade
48
- --force-recreate-venv Recreate virtualenv
49
-
50
- setup-ts options:
51
- --project-dir <path> Target Node project directory (default: cwd)
52
- --package-manager <name> npm | pnpm | yarn | bun (auto-detect if omitted)
53
- --skip-install Skip installing typescript and @types/node
54
- --tsconfig-path <path> tsconfig output path (default: tsconfig.json)
55
- --wrapper-path <path> Typed wrapper output path (default: src/synap.ts)
56
- --no-wrapper Do not generate the typed wrapper file
57
- --force Overwrite generated files when they already exist
58
-
59
- global:
60
- --help Show this help
61
- `);
62
- }
63
-
64
- async function run() {
65
- const args = parseArgs(process.argv.slice(2));
66
- const command = args._[0];
67
-
68
- if (!command || args.help || command === 'help') {
69
- printHelp();
70
- process.exit(0);
71
- }
72
-
73
- if (command === 'setup') {
74
- try {
75
- const result = await setupPythonRuntime({
76
- pythonBootstrap: args.python,
77
- sdkHome: args['sdk-home'],
78
- venvPath: args.venv,
79
- pythonPackage: args.package,
80
- pythonSdkVersion: args['sdk-version'],
81
- noDeps: !!args['no-deps'],
82
- noBuildIsolation: !!args['no-build-isolation'],
83
- upgrade: !!args.upgrade,
84
- forceRecreateVenv: !!args['force-recreate-venv'],
85
- });
86
-
87
- console.log('Synap JS SDK Python runtime setup complete.');
88
- console.log(JSON.stringify(result, null, 2));
89
- return;
90
- } catch (error) {
91
- console.error('Setup failed:');
92
- console.error(error.message || String(error));
93
- process.exit(1);
94
- }
95
- }
96
-
97
- if (command === 'setup-ts') {
98
- try {
99
- const result = await setupTypeScriptExtension({
100
- projectDir: args['project-dir'],
101
- packageManager: args['package-manager'],
102
- skipInstall: !!args['skip-install'],
103
- tsconfigPath: args['tsconfig-path'],
104
- wrapperPath: args['wrapper-path'],
105
- noWrapper: !!args['no-wrapper'],
106
- force: !!args.force,
107
- });
108
-
109
- console.log('Synap JS SDK TypeScript extension setup complete.');
110
- console.log(JSON.stringify(result, null, 2));
111
- return;
112
- } catch (error) {
113
- console.error('TypeScript setup failed:');
114
- console.error(error.message || String(error));
115
- process.exit(1);
116
- }
117
- }
118
-
119
- console.error(`Unknown command: ${command}`);
120
- printHelp();
121
- process.exit(1);
122
- }
123
-
124
- run();
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkRB57I2IQcjs = require('./chunk-RB57I2IQ.cjs');
5
+ require('./chunk-ZKOJDUN4.cjs');
6
+
7
+
8
+
9
+ exports.ANY_SCOPE = _chunkRB57I2IQcjs.ANY_SCOPE; exports.AnticipationCache = _chunkRB57I2IQcjs.AnticipationCache;
10
+ //# sourceMappingURL=anticipation-cache-ARYEEKMU.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/anish/maximemai/maximem_synap/synap/sdk/js/dist/anticipation-cache-ARYEEKMU.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,iHAAC","file":"/Users/anish/maximemai/maximem_synap/synap/sdk/js/dist/anticipation-cache-ARYEEKMU.cjs"}