@astrale-os/cli 1.0.0-beta.26 → 1.0.0-beta.28
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 +31 -5
- package/dist/astrale.js +1201 -358
- package/package.json +3 -2
- package/src/commands/__tests__/domain-install-operation.test.ts +23 -0
- package/src/commands/__tests__/install-identity-override.test.ts +3 -3
- package/src/commands/domain/install.ts +19 -11
- package/src/commands/get.ts +1 -1
- package/src/commands/identity/register.ts +3 -4
- package/src/commands/logs.ts +2 -5
- package/src/commands/session/analyze.ts +26 -4
- package/src/commands/update.ts +61 -40
- package/src/lib/__tests__/skills.test.ts +809 -0
- package/src/lib/skills/lock.ts +117 -0
- package/src/lib/skills/sync.ts +814 -0
- package/src/lib/skills.ts +1 -52
- package/src/program/__tests__/program.test.ts +1 -1
- package/src/setup/steps/skills.ts +40 -38
- package/src/telemetry/__tests__/retention.test.ts +180 -0
- package/src/telemetry/__tests__/settings.test.ts +102 -0
- package/src/telemetry/__tests__/store-scan.test.ts +128 -0
- package/src/telemetry/__tests__/trigger.test.ts +33 -4
- package/src/telemetry/recorder.ts +6 -3
- package/src/telemetry/retention.ts +129 -0
- package/src/telemetry/session.ts +18 -12
- package/src/telemetry/settings.ts +64 -11
- package/src/telemetry/store.ts +87 -9
- package/src/telemetry/trigger.ts +16 -28
- package/studio/client/dist/assets/index-BFVFs_8x.js +81 -0
- package/studio/client/dist/assets/index-DuB9iUdu.css +2 -0
- package/studio/client/dist/assets/schema-studio--a0kX3QU.css +1 -0
- package/studio/client/dist/assets/schema-studio-DH6oEWME.js +8 -0
- package/studio/client/dist/index.html +3 -3
- package/studio/server/agent/prompts/anchors.test.ts +17 -4
- package/studio/server/agent/prompts/anchors.ts +3 -2
- package/studio/server/agent/prompts/system.test.ts +2 -3
- package/studio/server/agent/prompts/system.ts +3 -3
- package/studio/server/agent/run/preparation.ts +1 -1
- package/studio/server/api/context.ts +1 -1
- package/studio/server/api/deployment.ts +1 -1
- package/studio/server/api/views.ts +2 -2
- package/studio/server/api/workspace.ts +1 -1
- package/studio/server/cache.test.ts +3 -8
- package/studio/server/cache.ts +4 -45
- package/studio/server/cli-consumers.test.ts +31 -2
- package/studio/server/handoff/copy.ts +1 -1
- package/studio/server/introspect/canonical-schema.test.ts +154 -128
- package/studio/server/introspect/canonical-schema.ts +183 -302
- package/studio/server/introspect/core.ts +14 -21
- package/studio/server/introspect/extractor.ts +11 -15
- package/studio/server/introspect/overlay-tsmorph.test.ts +1 -5
- package/studio/server/introspect/overlay-tsmorph.ts +0 -1
- package/studio/server/introspect/overlay.ts +3 -24
- package/studio/server/introspect/revision.test.ts +24 -28
- package/studio/server/introspect/revision.ts +10 -21
- package/studio/server/introspect/runtime.test.ts +14 -14
- package/studio/server/introspect/runtime.ts +1 -46
- package/studio/server/lifecycle.ts +4 -1
- package/studio/server/state/documents.test.ts +69 -0
- package/studio/server/state/documents.ts +57 -10
- package/studio/server/workspace/updates.ts +23 -1
- package/studio/shared/contracts/runtime.ts +4 -0
- package/studio/shared/contracts/schema.ts +10 -26
- package/studio/shared/contracts/surface.test.ts +2 -2
- package/studio/shared/contracts/workspace.ts +3 -0
- package/studio/shared/schema/identity.ts +0 -1
- package/tsconfig.json +1 -1
- package/studio/client/dist/assets/index-C0FAnwNw.css +0 -2
- package/studio/client/dist/assets/index-OeJK1TjG.js +0 -81
- package/studio/client/dist/assets/schema-studio-BilUNb6Z.css +0 -1
- package/studio/client/dist/assets/schema-studio-DRdfu_cQ.js +0 -8
- package/studio/server/introspect/core-extractor.ts +0 -30
- package/studio/server/introspect/overlay.test.ts +0 -44
- package/studio/server/introspect/source-overlay/annotations.ts +0 -14
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** Bun subprocess that projects canonical Core directly from the pure Schema entry. */
|
|
2
|
-
import { isAbsolute, resolve } from 'node:path'
|
|
3
|
-
|
|
4
|
-
import { findCanonicalDomainSchemaExport, projectCanonicalCore } from './canonical-schema'
|
|
5
|
-
|
|
6
|
-
const projectRoot = process.argv[3] ?? process.cwd()
|
|
7
|
-
const input = process.argv[2]
|
|
8
|
-
const schemaFile = input && !isAbsolute(input) ? resolve(projectRoot, input) : input
|
|
9
|
-
|
|
10
|
-
async function main(): Promise<void> {
|
|
11
|
-
if (!schemaFile) throw new Error('core-extractor: missing <schemaPath>')
|
|
12
|
-
const exports = (await import(schemaFile)) as Record<string, unknown>
|
|
13
|
-
const schema = findCanonicalDomainSchemaExport(exports)
|
|
14
|
-
if (schema === null) throw new Error('Schema entry exports no canonical V1 DomainSchema.')
|
|
15
|
-
const core = projectCanonicalCore(schema)
|
|
16
|
-
process.stdout.write(
|
|
17
|
-
JSON.stringify({
|
|
18
|
-
ok: true,
|
|
19
|
-
core: core.nodes.length === 0 && core.edges.length === 0 ? null : core,
|
|
20
|
-
}),
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
main().catch((cause: unknown) => {
|
|
25
|
-
const error = cause instanceof Error ? cause : new Error(String(cause))
|
|
26
|
-
process.stdout.write(
|
|
27
|
-
JSON.stringify({ ok: false, error: { message: error.message, stack: error.stack ?? '' } }),
|
|
28
|
-
)
|
|
29
|
-
process.exit(0)
|
|
30
|
-
})
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { expect, test } from 'bun:test'
|
|
2
|
-
|
|
3
|
-
import type { IrClassKey, SchemaIR } from '../../shared/types'
|
|
4
|
-
|
|
5
|
-
import { buildOverlay } from './overlay'
|
|
6
|
-
|
|
7
|
-
function descriptor(origin: string, name: string) {
|
|
8
|
-
const key = `${origin}:class.${name}` as IrClassKey
|
|
9
|
-
return { origin, ref: { origin, kind: 'class' as const, name }, key }
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
test('preserves homonymous Classes through exact import identity', () => {
|
|
13
|
-
const first = descriptor('a.example', 'Shared')
|
|
14
|
-
const second = descriptor('b.example', 'Shared')
|
|
15
|
-
const kernel = descriptor('kernel.astrale.ai', 'Identity')
|
|
16
|
-
const ir = {
|
|
17
|
-
version: 'v1',
|
|
18
|
-
format: 'astrale.dsl',
|
|
19
|
-
domain: 'app.example',
|
|
20
|
-
classes: {},
|
|
21
|
-
functions: {},
|
|
22
|
-
importsByKey: {
|
|
23
|
-
[first.key]: first,
|
|
24
|
-
[second.key]: second,
|
|
25
|
-
[kernel.key]: kernel,
|
|
26
|
-
},
|
|
27
|
-
importedClassesByKey: {},
|
|
28
|
-
views: {},
|
|
29
|
-
policies: {},
|
|
30
|
-
dependencies: [
|
|
31
|
-
{ origin: first.origin, revision: `sha256:${'a'.repeat(64)}` },
|
|
32
|
-
{ origin: second.origin, revision: `sha256:${'b'.repeat(64)}` },
|
|
33
|
-
],
|
|
34
|
-
core: {},
|
|
35
|
-
} satisfies SchemaIR
|
|
36
|
-
|
|
37
|
-
const overlay = buildOverlay({ ir, domainRoot: '', schemaDir: '' })
|
|
38
|
-
expect(overlay.crossDomainImports).toEqual([
|
|
39
|
-
{ name: 'Shared', origin: first.origin, ref: first.ref },
|
|
40
|
-
{ name: 'Shared', origin: second.origin, ref: second.ref },
|
|
41
|
-
])
|
|
42
|
-
expect(overlay.mixins).toEqual([{ name: 'Identity', origin: kernel.origin, ref: kernel.ref }])
|
|
43
|
-
expect(overlay.requires).toEqual(['a.example', 'b.example'])
|
|
44
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compatibility owner for Studio schema annotations.
|
|
3
|
-
*
|
|
4
|
-
* The current Kernel admits enum updates against their exact Value Schema, so
|
|
5
|
-
* there are no source-derived annotations today. The serialized overlay field
|
|
6
|
-
* remains consumed by the client and shared contract.
|
|
7
|
-
*/
|
|
8
|
-
import type { SchemaAnnotation, SchemaIR } from '../../../shared/types'
|
|
9
|
-
|
|
10
|
-
export function buildSchemaAnnotations(_args: { ir: SchemaIR | null }): SchemaAnnotation[] {
|
|
11
|
-
// The current Kernel admits updated values against their exact Value Schema;
|
|
12
|
-
// enum properties therefore need no Studio-specific compatibility warning.
|
|
13
|
-
return []
|
|
14
|
-
}
|