@swirls/looms 0.8.0 → 0.10.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/CHANGELOG.md +12 -0
- package/dist/actor/routing.js +2 -1
- package/dist/agent/debugger/agent-chat.js +6 -5
- package/dist/agent/debugger/index.js +2 -1
- package/dist/agent/module.d.ts +799 -593
- package/dist/agent/module.js +31 -0
- package/dist/agent/scope.js +1 -0
- package/dist/agent/signals.d.ts +108 -15
- package/dist/agent/signals.js +70 -47
- package/dist/approval/debugger/approvals-view.js +1 -1
- package/dist/approval/index.d.ts +1 -0
- package/dist/approval/index.js +1 -0
- package/dist/approval/module.d.ts +42 -1
- package/dist/approval/module.js +53 -0
- package/dist/approval/scope.js +1 -0
- package/dist/approval/signals.d.ts +19 -13
- package/dist/approval/signals.js +25 -45
- package/dist/approval/steps.d.ts +11 -0
- package/dist/approval/steps.js +39 -0
- package/dist/cli/commands.js +87 -16
- package/dist/client/client.d.ts +211 -0
- package/dist/client/client.js +18 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/module-scope.d.ts +50 -5
- package/dist/core/module-scope.js +22 -2
- package/dist/core/module.d.ts +29 -2
- package/dist/core/projection.d.ts +1 -0
- package/dist/core/published.d.ts +59 -1
- package/dist/core/published.js +97 -1
- package/dist/core/signals.d.ts +56 -0
- package/dist/core/signals.js +93 -0
- package/dist/core/validate-event.d.ts +12 -1
- package/dist/core/validate-event.js +34 -11
- package/dist/debugger/app/assets/index-CO5gIvV8.css +2 -0
- package/dist/debugger/app/assets/{index-CMRl_aWQ.js → index-D-2Q7ecG.js} +2 -2
- package/dist/debugger/app/assets/routes-lvmllT60.js +47 -0
- package/dist/debugger/app/index.html +2 -2
- package/dist/debugger/index.d.ts +1 -1
- package/dist/debugger/index.js +1 -1
- package/dist/debugger/lib/cn.d.ts +1 -1
- package/dist/debugger/lib/cn.js +12 -1
- package/dist/debugger/plugin.d.ts +11 -1
- package/dist/debugger/plugin.js +41 -0
- package/dist/debugger/shell/debugger-shell.js +1 -1
- package/dist/debugger/shell/form-fields.d.ts +17 -0
- package/dist/debugger/shell/form-fields.js +38 -0
- package/dist/debugger/shell/run-action.d.ts +6 -0
- package/dist/debugger/shell/run-action.js +15 -0
- package/dist/debugger/shell/run-controls.js +3 -55
- package/dist/debugger/shell/schema-form.d.ts +10 -1
- package/dist/debugger/shell/schema-form.js +108 -10
- package/dist/debugger/shell/signal-form.d.ts +18 -0
- package/dist/debugger/shell/signal-form.js +185 -0
- package/dist/debugger/shell/start-form.js +2 -32
- package/dist/debugger/shell/use-debounced-preview.d.ts +22 -0
- package/dist/debugger/shell/use-debounced-preview.js +68 -0
- package/dist/evaluator/index.d.ts +1 -1
- package/dist/evaluator/index.js +1 -1
- package/dist/evaluator/module.d.ts +8 -1
- package/dist/evaluator/module.js +33 -0
- package/dist/evaluator/scope.js +1 -0
- package/dist/projectors/event-log-ops.d.ts +68 -0
- package/dist/projectors/event-log-ops.js +79 -0
- package/dist/projectors/event-log.d.ts +4 -68
- package/dist/projectors/event-log.js +4 -79
- package/dist/projectors/replica/migrations.d.ts +4 -6
- package/dist/projectors/replica/migrations.js +18 -1
- package/dist/projectors/replica/sqlite-bun.d.ts +5 -0
- package/dist/projectors/replica/sqlite-bun.js +39 -0
- package/dist/projectors/replica/sqlite-migrations.d.ts +5 -0
- package/dist/projectors/replica/sqlite-migrations.js +99 -0
- package/dist/projectors/replica/sqlite.d.ts +95 -0
- package/dist/projectors/replica/sqlite.js +517 -0
- package/dist/runtime/server/routes/definitions.d.ts +1 -1
- package/dist/runtime/server/routes/definitions.js +58 -2
- package/dist/runtime/server/routes/runs.js +25 -1
- package/dist/schedule/module.d.ts +117 -1
- package/dist/schedule/module.js +30 -0
- package/dist/schedule/scope.js +1 -0
- package/dist/schedule/signals.d.ts +59 -7
- package/dist/schedule/signals.js +35 -17
- package/dist/testing/corpus-module.d.ts +1 -1
- package/dist/testing/index.js +2 -1
- package/dist/testing/module-examples.d.ts +6 -0
- package/dist/testing/module-examples.js +66 -0
- package/dist/workflow/module.d.ts +3 -1
- package/dist/workflow/module.js +13 -0
- package/dist/workflow/scope.js +1 -0
- package/package.json +17 -1
- package/dist/debugger/app/assets/index-B7GdT1UA.css +0 -2
- package/dist/debugger/app/assets/routes-CfXxKG45.js +0 -47
- /package/dist/evaluator/{signals.d.ts → steps.d.ts} +0 -0
- /package/dist/evaluator/{signals.js → steps.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @swirls/looms
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ddcb70f: Schema-first signals: declare builders with `m.signal` / `defineSignal`, publish and run them over HTTP, and use a schema-aware debugger signal picker. Built-in signal helpers take object input. Modules also publish a description and keep signals, steps, and example traces as first-class members.
|
|
8
|
+
|
|
9
|
+
## 0.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- f6e2758: Add `sqliteReplica` for a shared SQLite or Cloudflare D1 copy of every run. `looms replica` takes `--dialect sqlite`.
|
|
14
|
+
|
|
3
15
|
## 0.8.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/actor/routing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Data, Effect, Option, Predicate, Schema } from 'effect';
|
|
2
|
-
import { composeModules, createRunId, isJsonObject, publishDefinition, publishEffects, stringifyJson, } from '@swirls/looms/core';
|
|
2
|
+
import { composeModules, createRunId, isJsonObject, publishDefinition, publishEffects, publishModules, stringifyJson, } from '@swirls/looms/core';
|
|
3
3
|
const RunTargetBodySchema = Schema.Struct({
|
|
4
4
|
runId: Schema.optional(Schema.NonEmptyString),
|
|
5
5
|
});
|
|
@@ -56,6 +56,7 @@ export function definitionsResponse(req, modules) {
|
|
|
56
56
|
return Response.json({
|
|
57
57
|
definitions: registry.definitions.map(publishDefinition),
|
|
58
58
|
projections: [...registry.projections.keys()],
|
|
59
|
+
modules: publishModules(registry.modules),
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
export class RunTargetError extends Data.TaggedError('RunTargetError') {
|
|
@@ -115,7 +115,7 @@ export function AgentChat(context) {
|
|
|
115
115
|
}
|
|
116
116
|
setDraft('');
|
|
117
117
|
start(input, session
|
|
118
|
-
? (started) => client.signal(started.runId, agentSessionMessageEvents(createEventId(), content, { threadId: started.threadId }))
|
|
118
|
+
? (started) => client.signal(started.runId, agentSessionMessageEvents({ messageId: createEventId(), text: content }, { threadId: started.threadId }))
|
|
119
119
|
: undefined);
|
|
120
120
|
}
|
|
121
121
|
return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [runId ? (_jsx(Transcript, { runId: runId })) : (_jsx("div", { className: "min-h-0 flex-1", children: _jsx(EmptyState, { icon: _jsx(MessageSquare, {}), title: `Talk to ${definition.name}`, children: "Your first message starts a new run." }) })), runId ? (_jsx(FollowUp, { runId: runId, session: session, delivery: delivery, setDelivery: setDelivery, startError: error, onForked: context.onStarted })) : (_jsx(Composer, { value: draft, onChange: setDraft, onSubmit: send, pending: pending, placeholder: `Message ${definition.name}…`, submitLabel: "Start", error: error }))] }));
|
|
@@ -166,12 +166,13 @@ function Reply({ runId, session, delivery, setDelivery, startError }) {
|
|
|
166
166
|
setPending(true);
|
|
167
167
|
setError(null);
|
|
168
168
|
const events = session
|
|
169
|
-
? agentSessionMessageEvents(
|
|
169
|
+
? agentSessionMessageEvents({
|
|
170
|
+
messageId: createEventId(),
|
|
171
|
+
text: content,
|
|
170
172
|
delivery,
|
|
171
|
-
threadId: rootThreadId,
|
|
172
173
|
activeChildThreadId: delivery === 'steer' ? activeSessionChild(store.events()) : undefined,
|
|
173
|
-
})
|
|
174
|
-
: [userMessage(content, { threadId: rootThreadId })];
|
|
174
|
+
}, { threadId: rootThreadId })
|
|
175
|
+
: [userMessage({ content }, { threadId: rootThreadId })];
|
|
175
176
|
const [only] = events;
|
|
176
177
|
const commit = events.length === 1 && only ? store.commit(only) : store.commit(events);
|
|
177
178
|
commit
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inputForm, messageInput } from '@swirls/looms/debugger';
|
|
2
|
-
import { tokenUsage } from '../projections.js';
|
|
2
|
+
import { conversation, tokenUsage, turnActivity } from '../projections.js';
|
|
3
3
|
import { AgentChat } from './agent-chat.js';
|
|
4
4
|
import { summarizeAgentEvent } from './summarize.js';
|
|
5
5
|
import { TokenUsageView } from './token-usage.js';
|
|
@@ -15,5 +15,6 @@ export const agentDebugger = {
|
|
|
15
15
|
component: AgentChat,
|
|
16
16
|
},
|
|
17
17
|
projections: [{ name: tokenUsage.name, component: TokenUsageView }],
|
|
18
|
+
headlessProjections: [conversation.name, turnActivity.name],
|
|
18
19
|
};
|
|
19
20
|
export { AgentChat, TokenUsageView };
|