@skastr0/prism-linux-x64 0.1.2 → 0.1.3

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/bin/prism CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skastr0/prism-linux-x64",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Prism standalone CLI binary for Linux x64.",
6
6
  "license": "MIT",
@@ -0,0 +1,27 @@
1
+ import { Effect } from "effect";
2
+ /**
3
+ * Minimal in-memory authoring runtime that stubs the `prism` module for
4
+ * plugin source files. It provides the typed-ref helpers and definition
5
+ * builders used by `.agent.ts`, `.orbit.ts`, `.trait.ts`, `.tool.ts`,
6
+ * `.toolspace.ts`, `.modelspace.ts`, `.skillspace.ts`, and `.hook.ts` files.
7
+ *
8
+ * The real semantic validation happens later in the compiler; this runtime
9
+ * only needs to return plain data structures so that source modules can be
10
+ * imported/bundled without resolving the full `prism` package.
11
+ */
12
+ export declare const AUTHORING_RUNTIME_JS = "\nconst withNamedRef = (kind, first, second) =>\n second === undefined ? { kind, name: first } : { kind, plugin: first, name: second };\n\nexport const traitRef = (first, second) => withNamedRef(\"trait-ref\", first, second);\nexport const agentRef = (first, second) => withNamedRef(\"agent-ref\", first, second);\nexport const orbitRef = (first, second) => withNamedRef(\"orbit-ref\", first, second);\n\nexport const toolRef = (first, second, third) =>\n third === undefined\n ? { kind: \"tool-ref\", toolspace: first, name: second }\n : { kind: \"tool-ref\", plugin: first, toolspace: second, name: third };\n\nexport const toolGroupRef = (first, second, third) =>\n third === undefined\n ? { kind: \"tool-group-ref\", toolspace: first, name: second }\n : { kind: \"tool-group-ref\", plugin: first, toolspace: second, name: third };\n\nexport const modelProfileRef = (first, second, third) =>\n third === undefined\n ? { kind: \"model-profile-ref\", modelspace: first, name: second }\n : { kind: \"model-profile-ref\", plugin: first, modelspace: second, name: third };\n\nexport const skillRef = (first, second) => withNamedRef(\"skill-ref\", first, second);\n\nexport const skillspaceRef = (first, second, third) =>\n third === undefined\n ? { kind: \"skillspace-ref\", skillspace: first, name: second }\n : { kind: \"skillspace-ref\", plugin: first, skillspace: second, name: third };\n\nexport const schemaSlot = (options = {}) => ({ kind: \"schema\", ...options });\nexport const bindTrait = (trait, options = {}) => ({\n kind: \"trait-binding\",\n trait,\n ...(options.tools ? { tools: options.tools } : {}),\n});\n\nexport const defineAgent = (agent) => agent;\nexport const defineTrait = (trait) => trait;\nexport const defineOrbit = (orbit) => orbit;\nexport const defineTool = (tool) => tool;\nexport const defineToolspace = (toolspace) => toolspace;\nexport const defineModelspace = (modelspace) => modelspace;\nexport const defineSkillspace = (skillspace) => skillspace;\nexport const defineHook = (hook) => hook;\n\nexport const hookEvent = {\n toolBefore: \"tool.before\",\n toolAfter: \"tool.after\",\n promptSubmit: \"prompt.submit\",\n permissionRequest: \"permission.request\",\n sessionStart: \"session.start\",\n sessionEnd: \"session.end\",\n};\n\nexport const hookTool = {\n any: () => ({ kind: \"hook-any-tool\" }),\n tool: (tool) => ({ kind: \"hook-toolspace-tool\", tool }),\n group: (group) => ({ kind: \"hook-toolspace-group\", group }),\n canonical: (ref) => ({ kind: \"hook-canonical-tool\", ref }),\n};\n\nexport const hookMatcher = {\n tool: hookTool,\n};\n";
13
+ declare class AuthoringRuntimeWriteError {
14
+ readonly cause: unknown;
15
+ readonly _tag = "AuthoringRuntimeWriteError";
16
+ constructor(cause: unknown);
17
+ }
18
+ /**
19
+ * Return a file path to a persisted copy of the authoring runtime. The file
20
+ * is written once per process and reused across plugin compiles.
21
+ */
22
+ export declare const getAuthoringRuntimePath: () => Effect.Effect<string, AuthoringRuntimeWriteError, never>;
23
+ /**
24
+ * For tests that need to clean up the machine-global temp runtime file.
25
+ */
26
+ export declare const getAuthoringRuntimeDir: () => string | undefined;
27
+ export {};
@@ -4,5 +4,6 @@ export declare const sanitizeGeneratedToolSegment: (value: string, fallback: str
4
4
  export declare const generatedToolNamespace: (pluginName: string) => string;
5
5
  export declare const generatedOwnerToolName: (toolPluginName: string, toolName: string) => string;
6
6
  export declare const generatedSyntheticToolName: (sourcePluginName: string, contractName: string) => string;
7
+ export declare const generatedPluginIdForOwner: (ownerPluginName: string) => string;
7
8
  export declare const generatedToolNameForBinding: (sourcePluginName: string, binding: ResolvedContractBinding) => string;
8
9
  export declare const sourceIsInside: (sourcePath: string, root: string) => boolean;
@@ -18,6 +18,35 @@ export interface PrepareImportWrapperOptions {
18
18
  }
19
19
  export declare const prepareImportWrapper: (sourcePath: string, options?: PrepareImportWrapperOptions) => Promise<{
20
20
  readonly specifier: string;
21
+ readonly transformedPath: string;
22
+ readonly cleanup: () => Promise<void>;
23
+ }>;
24
+ /**
25
+ * Prepare a plugin source file for bundling by `bun build`.
26
+ *
27
+ * Unlike `prepareImportWrapper`, which produces `file:///` specifiers suitable
28
+ * for runtime `import()`, this helper produces absolute POSIX paths so the
29
+ * bundler can resolve `prism`/`effect` imports without relying on ambient
30
+ * `node_modules`. The transformed plugin root is cached and cleaned up the
31
+ * same way as `prepareImportWrapper`.
32
+ */
33
+ export declare const prepareBundleSource: (sourcePath: string) => Promise<{
34
+ readonly transformedPath: string;
35
+ readonly cleanup: () => Promise<void>;
36
+ }>;
37
+ /**
38
+ * Prepare a plugin source file for bundling into an executable hook wrapper.
39
+ *
40
+ * Unlike `prepareBundleSource`, which rewrites `prism` to the compile-time
41
+ * authoring runtime stub, this helper rewrites `prism` to the real Prism source
42
+ * entry so the bundled hook can execute. `effect` is rewritten to the same
43
+ * runtime Effect module used by the wrapper, preventing duplicate Effect
44
+ * instances. Absolute imports that point back at the local Prism source entry
45
+ * (common in test fixtures and local helper files) are normalized to bare
46
+ * `prism` first.
47
+ */
48
+ export declare const prepareHookBundleSource: (sourcePath: string) => Promise<{
49
+ readonly transformedPath: string;
21
50
  readonly cleanup: () => Promise<void>;
22
51
  }>;
23
52
  export declare const loadPlugin: (pluginPath: string) => Effect.Effect<PluginRegistry, CompileError>;
package/types/types.d.ts CHANGED
@@ -38,7 +38,6 @@ export interface PluginRuntimeMcpHarnessConfig {
38
38
  transport?: PrismMcpTransport;
39
39
  host?: string;
40
40
  port?: number;
41
- tokenEnv?: string;
42
41
  connectTimeoutMs?: number;
43
42
  toolTimeoutMs?: number;
44
43
  }
@@ -4,6 +4,7 @@ export interface KimiWorkflowWorkerOptions {
4
4
  readonly cwd: string;
5
5
  readonly bin?: string;
6
6
  readonly model?: string;
7
+ readonly kimiHome?: string;
7
8
  readonly processTimeoutMs?: number;
8
9
  readonly abortSignal?: AbortSignal;
9
10
  }
@@ -4,6 +4,7 @@ export interface WorkflowWorkerProcessOptions {
4
4
  readonly cwd: string;
5
5
  readonly abortSignal?: AbortSignal;
6
6
  readonly processTimeoutMs?: number;
7
+ readonly env?: Record<string, string>;
7
8
  }
8
9
  export interface WorkflowWorkerProcessResult {
9
10
  readonly exitCode: number | null;