@nimiplatform/sdk 0.15.0 → 0.22.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 +500 -1
- package/README.md +181 -346
- package/dist/core/ai/capability-configuration.d.ts +15 -0
- package/dist/core/ai/capability-configuration.d.ts.map +1 -1
- package/dist/core/ai/capability-configuration.js +36 -0
- package/dist/core/ai/capability-configuration.js.map +1 -1
- package/dist/core/ai/embeddings.d.ts +6 -0
- package/dist/core/ai/embeddings.d.ts.map +1 -1
- package/dist/core/ai/embeddings.js +33 -4
- package/dist/core/ai/embeddings.js.map +1 -1
- package/dist/core/ai/index.d.ts +4 -0
- package/dist/core/ai/index.d.ts.map +1 -1
- package/dist/core/ai/index.js +3 -0
- package/dist/core/ai/index.js.map +1 -1
- package/dist/core/ai/local-app-model.d.ts +15 -4
- package/dist/core/ai/local-app-model.d.ts.map +1 -1
- package/dist/core/ai/local-app-model.js +57 -18
- package/dist/core/ai/local-app-model.js.map +1 -1
- package/dist/core/ai/music-input-wire.d.ts +4 -0
- package/dist/core/ai/music-input-wire.d.ts.map +1 -0
- package/dist/core/ai/music-input-wire.js +9 -0
- package/dist/core/ai/music-input-wire.js.map +1 -0
- package/dist/core/ai/music-input.d.ts +44 -0
- package/dist/core/ai/music-input.d.ts.map +1 -0
- package/dist/core/ai/music-input.js +69 -0
- package/dist/core/ai/music-input.js.map +1 -0
- package/dist/core/ai/reasoning.d.ts +32 -0
- package/dist/core/ai/reasoning.d.ts.map +1 -0
- package/dist/core/ai/reasoning.js +74 -0
- package/dist/core/ai/reasoning.js.map +1 -0
- package/dist/core/ai/runtime-model.d.ts +2 -19
- package/dist/core/ai/runtime-model.d.ts.map +1 -1
- package/dist/core/ai/runtime-model.js +3 -47
- package/dist/core/ai/runtime-model.js.map +1 -1
- package/dist/core/ai/speech-input.d.ts +9 -0
- package/dist/core/ai/speech-input.d.ts.map +1 -0
- package/dist/core/ai/speech-input.js +16 -0
- package/dist/core/ai/speech-input.js.map +1 -0
- package/dist/core/ai/text-runner.js +11 -4
- package/dist/core/ai/text-runner.js.map +1 -1
- package/dist/core/app/desktop-open.d.ts +11 -5
- package/dist/core/app/desktop-open.d.ts.map +1 -1
- package/dist/core/app/desktop-open.js +24 -16
- package/dist/core/app/desktop-open.js.map +1 -1
- package/dist/core/app/index.d.ts +32 -5
- package/dist/core/app/index.d.ts.map +1 -1
- package/dist/core/app/index.js +19 -1
- package/dist/core/app/index.js.map +1 -1
- package/dist/core/app/local-app-agent-introduction.d.ts +33 -0
- package/dist/core/app/local-app-agent-introduction.d.ts.map +1 -0
- package/dist/core/app/local-app-agent-introduction.js +94 -0
- package/dist/core/app/local-app-agent-introduction.js.map +1 -0
- package/dist/core/app/local-app-agent-work-input.d.ts +24 -0
- package/dist/core/app/local-app-agent-work-input.d.ts.map +1 -0
- package/dist/core/app/local-app-agent-work-input.js +50 -0
- package/dist/core/app/local-app-agent-work-input.js.map +1 -0
- package/dist/core/app/local-app-audio-separation.d.ts +9 -0
- package/dist/core/app/local-app-audio-separation.d.ts.map +1 -1
- package/dist/core/app/local-app-audio-separation.js +64 -3
- package/dist/core/app/local-app-audio-separation.js.map +1 -1
- package/dist/core/app/local-app-bytes.d.ts +10 -0
- package/dist/core/app/local-app-bytes.d.ts.map +1 -0
- package/dist/core/app/local-app-bytes.js +27 -0
- package/dist/core/app/local-app-bytes.js.map +1 -0
- package/dist/core/app/local-app-music-transcription.d.ts +43 -0
- package/dist/core/app/local-app-music-transcription.d.ts.map +1 -0
- package/dist/core/app/local-app-music-transcription.js +94 -0
- package/dist/core/app/local-app-music-transcription.js.map +1 -0
- package/dist/core/app/local-app-music.d.ts +50 -0
- package/dist/core/app/local-app-music.d.ts.map +1 -0
- package/dist/core/app/local-app-music.js +135 -0
- package/dist/core/app/local-app-music.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-activity-view.d.ts +59 -0
- package/dist/core/app/local-app-runtime-platform-activity-view.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-activity-view.js +285 -0
- package/dist/core/app/local-app-runtime-platform-activity-view.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-activity.d.ts +219 -0
- package/dist/core/app/local-app-runtime-platform-activity.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-activity.js +753 -0
- package/dist/core/app/local-app-runtime-platform-activity.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-agent-references.d.ts +4 -0
- package/dist/core/app/local-app-runtime-platform-agent-references.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-agent-references.js +21 -9
- package/dist/core/app/local-app-runtime-platform-agent-references.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-agent-work.d.ts +88 -0
- package/dist/core/app/local-app-runtime-platform-agent-work.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-agent-work.js +165 -0
- package/dist/core/app/local-app-runtime-platform-agent-work.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-ai-config.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-ai-config.js +55 -1
- package/dist/core/app/local-app-runtime-platform-ai-config.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-ai.d.ts +154 -36
- package/dist/core/app/local-app-runtime-platform-ai.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-ai.js +738 -121
- package/dist/core/app/local-app-runtime-platform-ai.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-assets.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-assets.js +37 -12
- package/dist/core/app/local-app-runtime-platform-assets.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-configure.d.ts +38 -4
- package/dist/core/app/local-app-runtime-platform-configure.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-configure.js +130 -28
- package/dist/core/app/local-app-runtime-platform-configure.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-conversation.d.ts +74 -10
- package/dist/core/app/local-app-runtime-platform-conversation.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-conversation.js +176 -29
- package/dist/core/app/local-app-runtime-platform-conversation.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-direct-agent-work.d.ts +5 -0
- package/dist/core/app/local-app-runtime-platform-direct-agent-work.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-direct-agent-work.js +38 -0
- package/dist/core/app/local-app-runtime-platform-direct-agent-work.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-direct-conversation.d.ts +4 -1
- package/dist/core/app/local-app-runtime-platform-direct-conversation.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-direct-conversation.js +64 -11
- package/dist/core/app/local-app-runtime-platform-direct-conversation.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.d.ts +2 -0
- package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.js +10 -2
- package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-integration.d.ts +128 -0
- package/dist/core/app/local-app-runtime-platform-integration.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-integration.js +263 -0
- package/dist/core/app/local-app-runtime-platform-integration.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-life.d.ts +33 -0
- package/dist/core/app/local-app-runtime-platform-life.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-life.js +59 -0
- package/dist/core/app/local-app-runtime-platform-life.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-proactive.d.ts +28 -0
- package/dist/core/app/local-app-runtime-platform-proactive.d.ts.map +1 -0
- package/dist/core/app/local-app-runtime-platform-proactive.js +42 -0
- package/dist/core/app/local-app-runtime-platform-proactive.js.map +1 -0
- package/dist/core/app/local-app-runtime-platform-realm-realtime.d.ts +6 -2
- package/dist/core/app/local-app-runtime-platform-realm-realtime.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-realm-realtime.js +15 -4
- package/dist/core/app/local-app-runtime-platform-realm-realtime.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-validation.d.ts +2 -0
- package/dist/core/app/local-app-runtime-platform-validation.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-validation.js +42 -3
- package/dist/core/app/local-app-runtime-platform-validation.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform-vision.d.ts +1 -1
- package/dist/core/app/local-app-runtime-platform-vision.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform-vision.js +5 -5
- package/dist/core/app/local-app-runtime-platform-vision.js.map +1 -1
- package/dist/core/app/local-app-runtime-platform.d.ts +22 -17
- package/dist/core/app/local-app-runtime-platform.d.ts.map +1 -1
- package/dist/core/app/local-app-runtime-platform.js +22 -8
- package/dist/core/app/local-app-runtime-platform.js.map +1 -1
- package/dist/core/app/local-app-speaker-embedding.d.ts +6 -0
- package/dist/core/app/local-app-speaker-embedding.d.ts.map +1 -0
- package/dist/core/app/local-app-speaker-embedding.js +14 -0
- package/dist/core/app/local-app-speaker-embedding.js.map +1 -0
- package/dist/core/app/local-app-text-decision.d.ts +114 -0
- package/dist/core/app/local-app-text-decision.d.ts.map +1 -0
- package/dist/core/app/local-app-text-decision.js +444 -0
- package/dist/core/app/local-app-text-decision.js.map +1 -0
- package/dist/core/app/local-app-text.d.ts +7 -1
- package/dist/core/app/local-app-text.d.ts.map +1 -1
- package/dist/core/app/local-app-text.js +16 -15
- package/dist/core/app/local-app-text.js.map +1 -1
- package/dist/core/app/local-app-transcription.d.ts +11 -0
- package/dist/core/app/local-app-transcription.d.ts.map +1 -1
- package/dist/core/app/local-app-transcription.js +22 -2
- package/dist/core/app/local-app-transcription.js.map +1 -1
- package/dist/core/app/local-app-voice-convert.d.ts +61 -0
- package/dist/core/app/local-app-voice-convert.d.ts.map +1 -0
- package/dist/core/app/local-app-voice-convert.js +133 -0
- package/dist/core/app/local-app-voice-convert.js.map +1 -0
- package/dist/core/app/runtime-account-realm-source-readiness.generated.d.ts +2 -2
- package/dist/core/app/runtime-account-realm-source-readiness.generated.d.ts.map +1 -1
- package/dist/core/app/runtime-account-realm-source-readiness.generated.js +17 -12
- package/dist/core/app/runtime-account-realm-source-readiness.generated.js.map +1 -1
- package/dist/core/text-stream-cleanup.d.ts +3 -0
- package/dist/core/text-stream-cleanup.d.ts.map +1 -0
- package/dist/core/text-stream-cleanup.js +19 -0
- package/dist/core/text-stream-cleanup.js.map +1 -0
- package/dist/core-generated/realm-client.d.ts.map +1 -1
- package/dist/core-generated/realm-client.js +43 -103
- package/dist/core-generated/realm-client.js.map +1 -1
- package/dist/core-generated/realm-typed-client.d.ts +339 -457
- package/dist/core-generated/realm-typed-client.d.ts.map +1 -1
- package/dist/core-generated/realm-typed-client.js +72 -208
- package/dist/core-generated/realm-typed-client.js.map +1 -1
- package/dist/core-generated/runtime-client.d.ts.map +1 -1
- package/dist/core-generated/runtime-client.js +388 -12
- package/dist/core-generated/runtime-client.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.d.ts +16 -18
- package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/google/protobuf/struct.d.ts +33 -22
- package/dist/core-generated/runtime-protobuf/google/protobuf/struct.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/google/protobuf/struct.js +8 -3
- package/dist/core-generated/runtime-protobuf/google/protobuf/struct.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/google/protobuf/timestamp.d.ts +3 -3
- package/dist/core-generated/runtime-protobuf/runtime/v1/account.d.ts +31 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/account.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/account.js +49 -5
- package/dist/core-generated/runtime-protobuf/runtime/v1/account.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.d.ts +147 -4
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.js +327 -14
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.d.ts +167 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.d.ts.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.js +312 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.js.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.d.ts +606 -148
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.js +1631 -722
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.d.ts +9 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.js +8 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.d.ts +625 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.d.ts.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.js +1369 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.js.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/ai.d.ts +1872 -106
- package/dist/core-generated/runtime-protobuf/runtime/v1/ai.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/ai.js +4718 -1513
- package/dist/core-generated/runtime-protobuf/runtime/v1/ai.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/app.d.ts +40 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/app.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/app.js +72 -3
- package/dist/core-generated/runtime-protobuf/runtime/v1/app.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.d.ts +859 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.d.ts.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.js +1663 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.js.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/audit.d.ts +712 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/audit.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/audit.js +1461 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/audit.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/auth.d.ts +20 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/auth.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/auth.js +38 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/auth.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.d.ts +548 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.js +1309 -242
- package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.d.ts +67 -4
- package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.js +101 -10
- package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/common.d.ts +150 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/common.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/common.js +149 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/common.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/connector.d.ts +81 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/connector.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/connector.js +166 -5
- package/dist/core-generated/runtime-protobuf/runtime/v1/connector.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/development.d.ts +53 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/development.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/development.js +118 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/development.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/integration.d.ts +1293 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/integration.d.ts.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/integration.js +2898 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/integration.js.map +1 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.d.ts +166 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.js +217 -4
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.d.ts +8 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.js +9 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.d.ts +181 -8
- package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.js +402 -18
- package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.js.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.d.ts +110 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.d.ts.map +1 -1
- package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.js +213 -0
- package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.js.map +1 -1
- package/dist/core-generated/runtime-public-client.d.ts.map +1 -1
- package/dist/core-generated/runtime-public-client.js +364 -20
- package/dist/core-generated/runtime-public-client.js.map +1 -1
- package/dist/core-generated/runtime-public-rpc-auth-posture.d.ts.map +1 -1
- package/dist/core-generated/runtime-public-rpc-auth-posture.js +46 -3
- package/dist/core-generated/runtime-public-rpc-auth-posture.js.map +1 -1
- package/dist/core-generated/runtime-public-wire-codecs.d.ts +56 -10
- package/dist/core-generated/runtime-public-wire-codecs.d.ts.map +1 -1
- package/dist/core-generated/runtime-public-wire-codecs.js +56 -10
- package/dist/core-generated/runtime-public-wire-codecs.js.map +1 -1
- package/dist/core-generated/runtime-rpc-auth-posture.d.ts.map +1 -1
- package/dist/core-generated/runtime-rpc-auth-posture.js +49 -2
- package/dist/core-generated/runtime-rpc-auth-posture.js.map +1 -1
- package/dist/core-generated/runtime-typed-client.d.ts +86 -26
- package/dist/core-generated/runtime-typed-client.d.ts.map +1 -1
- package/dist/core-generated/runtime-typed-client.js +487 -11
- package/dist/core-generated/runtime-typed-client.js.map +1 -1
- package/dist/core-generated/runtime-wire-codecs.d.ts +60 -10
- package/dist/core-generated/runtime-wire-codecs.d.ts.map +1 -1
- package/dist/core-generated/runtime-wire-codecs.js +61 -11
- package/dist/core-generated/runtime-wire-codecs.js.map +1 -1
- package/dist/features/generation/index.d.ts +14 -2
- package/dist/features/generation/index.d.ts.map +1 -1
- package/dist/features/generation/index.js +14 -1
- package/dist/features/generation/index.js.map +1 -1
- package/dist/features/generation/media-params.d.ts +0 -3
- package/dist/features/generation/media-params.d.ts.map +1 -1
- package/dist/features/generation/media-params.js +8 -6
- package/dist/features/generation/media-params.js.map +1 -1
- package/dist/features/generation/runtime-generation-build.d.ts +0 -1
- package/dist/features/generation/runtime-generation-build.d.ts.map +1 -1
- package/dist/features/generation/runtime-generation-build.js +6 -1
- package/dist/features/generation/runtime-generation-build.js.map +1 -1
- package/dist/features/generation/runtime-image-generation.d.ts +5 -1
- package/dist/features/generation/runtime-image-generation.d.ts.map +1 -1
- package/dist/features/generation/runtime-image-generation.js +4 -0
- package/dist/features/generation/runtime-image-generation.js.map +1 -1
- package/dist/features/generation/runtime-job-builders.d.ts +0 -1
- package/dist/features/generation/runtime-job-builders.d.ts.map +1 -1
- package/dist/features/generation/runtime-job-builders.js +8 -10
- package/dist/features/generation/runtime-job-builders.js.map +1 -1
- package/dist/realm/account-settings.d.ts +5 -3
- package/dist/realm/account-settings.d.ts.map +1 -1
- package/dist/realm/account-settings.js +3 -3
- package/dist/realm/account-settings.js.map +1 -1
- package/dist/realm/generated.d.ts +1 -1
- package/dist/realm/generated.d.ts.map +1 -1
- package/dist/realm/generated.js.map +1 -1
- package/dist/realm/index.d.ts +4 -4
- package/dist/realm/index.d.ts.map +1 -1
- package/dist/realm/index.js +8 -17
- package/dist/realm/index.js.map +1 -1
- package/dist/realm/media-delivery.d.ts +4 -0
- package/dist/realm/media-delivery.d.ts.map +1 -0
- package/dist/realm/media-delivery.js +65 -0
- package/dist/realm/media-delivery.js.map +1 -0
- package/dist/realm/resource-upload.d.ts +12 -3
- package/dist/realm/resource-upload.d.ts.map +1 -1
- package/dist/realm/resource-upload.js +93 -241
- package/dist/realm/resource-upload.js.map +1 -1
- package/dist/realm/social-types.d.ts +1 -15
- package/dist/realm/social-types.d.ts.map +1 -1
- package/dist/realm/social.d.ts +3 -17
- package/dist/realm/social.d.ts.map +1 -1
- package/dist/realm/social.js +0 -175
- package/dist/realm/social.js.map +1 -1
- package/dist/runtime/chatgpt-plan.d.ts +7 -0
- package/dist/runtime/chatgpt-plan.d.ts.map +1 -0
- package/dist/runtime/chatgpt-plan.js +15 -0
- package/dist/runtime/chatgpt-plan.js.map +1 -0
- package/dist/runtime/config-projections.d.ts +12 -0
- package/dist/runtime/config-projections.d.ts.map +1 -1
- package/dist/runtime/config-projections.js +11 -3
- package/dist/runtime/config-projections.js.map +1 -1
- package/dist/runtime/connector-auth-acquisition-client.d.ts +3 -6
- package/dist/runtime/connector-auth-acquisition-client.d.ts.map +1 -1
- package/dist/runtime/connector-auth-acquisition-client.js +18 -11
- package/dist/runtime/connector-auth-acquisition-client.js.map +1 -1
- package/dist/runtime/connector-auth-acquisition-profiles.generated.d.ts +10 -11
- package/dist/runtime/connector-auth-acquisition-profiles.generated.d.ts.map +1 -1
- package/dist/runtime/connector-auth-acquisition-profiles.generated.js +13 -14
- package/dist/runtime/connector-auth-acquisition-profiles.generated.js.map +1 -1
- package/dist/runtime/connector-auth-acquisition.d.ts +26 -19
- package/dist/runtime/connector-auth-acquisition.d.ts.map +1 -1
- package/dist/runtime/connector-auth-acquisition.js +352 -269
- package/dist/runtime/connector-auth-acquisition.js.map +1 -1
- package/dist/runtime/connector-auth-profiles.generated.d.ts +1 -1
- package/dist/runtime/connector-auth-profiles.generated.d.ts.map +1 -1
- package/dist/runtime/connector-auth-profiles.generated.js +4 -4
- package/dist/runtime/connector-auth-profiles.generated.js.map +1 -1
- package/dist/runtime/connector-inventory.d.ts +19 -3
- package/dist/runtime/connector-inventory.d.ts.map +1 -1
- package/dist/runtime/connector-inventory.js +77 -25
- package/dist/runtime/connector-inventory.js.map +1 -1
- package/dist/runtime/desktop-audit.js +4 -1
- package/dist/runtime/desktop-audit.js.map +1 -1
- package/dist/runtime/desktop-first-party-runtime.d.ts +8 -1
- package/dist/runtime/desktop-first-party-runtime.d.ts.map +1 -1
- package/dist/runtime/desktop-first-party-runtime.js +80 -2
- package/dist/runtime/desktop-first-party-runtime.js.map +1 -1
- package/dist/runtime/first-party-protected-runtime-profiles.generated.d.ts +174 -10
- package/dist/runtime/first-party-protected-runtime-profiles.generated.d.ts.map +1 -1
- package/dist/runtime/first-party-protected-runtime-profiles.generated.js +45 -4
- package/dist/runtime/first-party-protected-runtime-profiles.generated.js.map +1 -1
- package/dist/runtime/generated.d.ts +2 -2
- package/dist/runtime/generated.d.ts.map +1 -1
- package/dist/runtime/generated.js +1 -1
- package/dist/runtime/generated.js.map +1 -1
- package/dist/runtime/host.d.ts +3 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/host.js +4 -0
- package/dist/runtime/host.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +12 -10
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/machine-loadouts.d.ts +18 -0
- package/dist/runtime/machine-loadouts.d.ts.map +1 -1
- package/dist/runtime/machine-loadouts.js +26 -0
- package/dist/runtime/machine-loadouts.js.map +1 -1
- package/dist/runtime/node-grpc-errors.js +3 -3
- package/dist/runtime/node-grpc-errors.js.map +1 -1
- package/dist/runtime/node-grpc.d.ts.map +1 -1
- package/dist/runtime/node-grpc.js +24 -4
- package/dist/runtime/node-grpc.js.map +1 -1
- package/dist/runtime/product-control-projection.d.ts.map +1 -1
- package/dist/runtime/product-control-projection.js +11 -2
- package/dist/runtime/product-control-projection.js.map +1 -1
- package/dist/runtime/product-control-types.d.ts +13 -2
- package/dist/runtime/product-control-types.d.ts.map +1 -1
- package/dist/runtime/product-control-types.js.map +1 -1
- package/dist/runtime/reason-messages.d.ts +6 -0
- package/dist/runtime/reason-messages.d.ts.map +1 -1
- package/dist/runtime/reason-messages.js +17 -2
- package/dist/runtime/reason-messages.js.map +1 -1
- package/dist/runtime/runtime-agent-inspect-projection.d.ts +2 -3
- package/dist/runtime/runtime-agent-inspect-projection.d.ts.map +1 -1
- package/dist/runtime/runtime-agent-inspect-projection.js +2 -27
- package/dist/runtime/runtime-agent-inspect-projection.js.map +1 -1
- package/dist/runtime/runtime-agent-inspect-types.d.ts +4 -32
- package/dist/runtime/runtime-agent-inspect-types.d.ts.map +1 -1
- package/dist/runtime/runtime-local-environment-client-projections.d.ts.map +1 -1
- package/dist/runtime/runtime-local-environment-client-projections.js +19 -19
- package/dist/runtime/runtime-local-environment-client-projections.js.map +1 -1
- package/dist/runtime/runtime-local-environment-client-types.d.ts +48 -21
- package/dist/runtime/runtime-local-environment-client-types.d.ts.map +1 -1
- package/dist/runtime/runtime-local-environment-client-values.d.ts +3 -1
- package/dist/runtime/runtime-local-environment-client-values.d.ts.map +1 -1
- package/dist/runtime/runtime-local-environment-client-values.js +43 -0
- package/dist/runtime/runtime-local-environment-client-values.js.map +1 -1
- package/dist/runtime/runtime-local-environment-client.d.ts.map +1 -1
- package/dist/runtime/runtime-local-environment-client.js +27 -4
- package/dist/runtime/runtime-local-environment-client.js.map +1 -1
- package/dist/runtime/runtime-local-recommendation-types.d.ts +3 -0
- package/dist/runtime/runtime-local-recommendation-types.d.ts.map +1 -1
- package/dist/runtime/runtime-local-recommendation.d.ts.map +1 -1
- package/dist/runtime/runtime-local-recommendation.js +1 -0
- package/dist/runtime/runtime-local-recommendation.js.map +1 -1
- package/dist/runtime/runtime-method-modules.d.ts +1 -1
- package/dist/runtime/runtime-method-modules.d.ts.map +1 -1
- package/dist/runtime/runtime-method-modules.js +4 -2
- package/dist/runtime/runtime-method-modules.js.map +1 -1
- package/dist/runtime/scenario-jobs.d.ts +23 -1
- package/dist/runtime/scenario-jobs.d.ts.map +1 -1
- package/dist/runtime/scenario-jobs.js +227 -264
- package/dist/runtime/scenario-jobs.js.map +1 -1
- package/dist/runtime/shared-local-agent-ai-config.d.ts.map +1 -1
- package/dist/runtime/shared-local-agent-ai-config.js +3 -0
- package/dist/runtime/shared-local-agent-ai-config.js.map +1 -1
- package/dist/runtime/wire-types/agent-participation-enums.d.ts +3 -1
- package/dist/runtime/wire-types/agent-participation-enums.d.ts.map +1 -1
- package/dist/runtime/wire-types/agent-participation-enums.js +3 -1
- package/dist/runtime/wire-types/agent-participation-enums.js.map +1 -1
- package/dist/runtime/wire-types/agent-participation-types.d.ts +8 -4
- package/dist/runtime/wire-types/agent-participation-types.d.ts.map +1 -1
- package/dist/runtime/wire-types/ai-scenario-enums.d.ts +130 -3
- package/dist/runtime/wire-types/ai-scenario-enums.d.ts.map +1 -1
- package/dist/runtime/wire-types/ai-scenario-enums.js +149 -0
- package/dist/runtime/wire-types/ai-scenario-enums.js.map +1 -1
- package/dist/runtime/wire-types/ai-scenario-types.d.ts +10 -8
- package/dist/runtime/wire-types/ai-scenario-types.d.ts.map +1 -1
- package/dist/runtime/wire-types/identity-app-enums.d.ts +47 -0
- package/dist/runtime/wire-types/identity-app-enums.d.ts.map +1 -1
- package/dist/runtime/wire-types/identity-app-enums.js +55 -0
- package/dist/runtime/wire-types/identity-app-enums.js.map +1 -1
- package/dist/runtime/wire-types/identity-app-types.d.ts +8 -6
- package/dist/runtime/wire-types/identity-app-types.d.ts.map +1 -1
- package/dist/runtime/wire-types/local-memory-enums.d.ts +40 -1
- package/dist/runtime/wire-types/local-memory-enums.d.ts.map +1 -1
- package/dist/runtime/wire-types/local-memory-enums.js +44 -0
- package/dist/runtime/wire-types/local-memory-enums.js.map +1 -1
- package/dist/runtime/wire-types/reason-code-enums.d.ts +29 -1
- package/dist/runtime/wire-types/reason-code-enums.d.ts.map +1 -1
- package/dist/runtime/wire-types/reason-code-enums.js +28 -0
- package/dist/runtime/wire-types/reason-code-enums.js.map +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +2 -2
- package/dist/types/errors.js.map +1 -1
- package/dist/types/reason-code.d.ts +2 -0
- package/dist/types/reason-code.d.ts.map +1 -1
- package/dist/types/reason-code.js +2 -0
- package/dist/types/reason-code.js.map +1 -1
- package/dist/types/sha256.d.ts +6 -1
- package/dist/types/sha256.d.ts.map +1 -1
- package/dist/types/sha256.js +60 -25
- package/dist/types/sha256.js.map +1 -1
- package/package.json +5 -5
- package/dist/realm/feed.d.ts +0 -4
- package/dist/realm/feed.d.ts.map +0 -1
- package/dist/realm/feed.js +0 -10
- package/dist/realm/feed.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { asRecord, assertExactKeys, assertExactProjectionKeys, localAppError, localAppProjectionError, } from './local-app-runtime-platform-validation.js';
|
|
2
|
+
import { MusicGenerationTermination, MusicScoreConditioning, MusicScoreFormat, MusicScoreOrigin, } from '../../core-generated/runtime-typed-client.js';
|
|
3
|
+
const inputError = () => localAppError('Invalid music generation input', 'SDK_LOCAL_APP_INPUT_INVALID', 'fix_input');
|
|
4
|
+
const uint = (value, min, max) => typeof value === 'number' && Number.isSafeInteger(value) && value >= min && value <= max;
|
|
5
|
+
const identifier = (value) => typeof value === 'string' && /^[A-Za-z0-9._:-]{1,128}$/.test(value);
|
|
6
|
+
const content = (value) => typeof value === 'string' && new TextEncoder().encode(value).length <= 32768 && !/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F\uD800-\uDFFF]/u.test(value);
|
|
7
|
+
// @nimi-authority: rule.nimi.runtime.ai-provider.music-generation
|
|
8
|
+
export function validateNimiLocalAppMusicGenerateSpec(value) {
|
|
9
|
+
const record = asRecord(value);
|
|
10
|
+
assertExactKeys(record, ['type', 'prompt', 'lyrics', 'durationSeconds', 'instrumental', 'seed', 'score', 'scoreConditioning', 'returnGeneratedScore', 'audioReference', 'videoReference'], 'music spec');
|
|
11
|
+
if (!record || record.type !== 'music-generate' || !content(record.prompt) || !record.prompt.trim() || !content(record.lyrics))
|
|
12
|
+
inputError();
|
|
13
|
+
if (record.durationSeconds !== undefined && !uint(record.durationSeconds, 1, 600))
|
|
14
|
+
inputError();
|
|
15
|
+
for (const key of ['instrumental', 'returnGeneratedScore'])
|
|
16
|
+
if (record[key] !== undefined && typeof record[key] !== 'boolean')
|
|
17
|
+
inputError();
|
|
18
|
+
if (record.instrumental && record.lyrics.trim())
|
|
19
|
+
inputError();
|
|
20
|
+
if (record.seed !== undefined && !uint(record.seed, 0, 0xffffffff))
|
|
21
|
+
inputError();
|
|
22
|
+
if (record.score !== undefined) {
|
|
23
|
+
const score = asRecord(record.score);
|
|
24
|
+
assertExactKeys(score, ['artifactId', 'format'], 'music score');
|
|
25
|
+
if (!score || !identifier(score.artifactId) || !['abc', 'midi'].includes(String(score.format)) || !['melody-only', 'melody-and-harmony'].includes(String(record.scoreConditioning)))
|
|
26
|
+
inputError();
|
|
27
|
+
}
|
|
28
|
+
else if (record.scoreConditioning !== undefined)
|
|
29
|
+
inputError();
|
|
30
|
+
if (record.audioReference !== undefined) {
|
|
31
|
+
const reference = asRecord(record.audioReference);
|
|
32
|
+
assertExactKeys(reference, ['artifactId', 'range'], 'music audio reference');
|
|
33
|
+
if (!reference || !identifier(reference.artifactId))
|
|
34
|
+
inputError();
|
|
35
|
+
if (reference.range !== undefined) {
|
|
36
|
+
const range = asRecord(reference.range);
|
|
37
|
+
assertExactKeys(range, ['startFrame', 'endFrame'], 'audio frame range');
|
|
38
|
+
if (!range || !uint(range.startFrame, 0, 57600000) || !uint(range.endFrame, 1, 57600000) || range.startFrame >= range.endFrame)
|
|
39
|
+
inputError();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (record.videoReference !== undefined) {
|
|
43
|
+
const reference = asRecord(record.videoReference);
|
|
44
|
+
assertExactKeys(reference, ['artifactId'], 'music video reference');
|
|
45
|
+
if (!reference || !identifier(reference.artifactId))
|
|
46
|
+
inputError();
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
// @nimi-authority: rule.nimi.runtime.ai-provider.music-generation
|
|
51
|
+
export function validateNimiLocalAppMusicGeneration(value, artifactsValue) {
|
|
52
|
+
const record = asRecord(value);
|
|
53
|
+
assertExactProjectionKeys(record, ['mixArtifactId', 'termination', 'audioInfo',
|
|
54
|
+
...(record && Object.hasOwn(record, 'generatedScore') ? ['generatedScore'] : []),
|
|
55
|
+
...(record && Object.hasOwn(record, 'actualSeed') ? ['actualSeed'] : [])], 'music generation');
|
|
56
|
+
if (!record || !identifier(record.mixArtifactId) || !['unknown', 'model-end', 'budget-limit'].includes(String(record.termination))
|
|
57
|
+
|| (record.actualSeed !== undefined && !uint(record.actualSeed, 0, 0xffffffff)))
|
|
58
|
+
localAppProjectionError('music generation');
|
|
59
|
+
const info = asRecord(record.audioInfo);
|
|
60
|
+
assertExactProjectionKeys(info, ['sampleRateHz', 'channels', 'frameCount', 'durationMs'], 'music audio facts');
|
|
61
|
+
if (!info || !uint(info.sampleRateHz, 8000, 96000) || !uint(info.channels, 1, 2) || !uint(info.frameCount, 1, info.sampleRateHz * 600)
|
|
62
|
+
|| info.durationMs !== Math.floor(info.frameCount * 1000 / info.sampleRateHz))
|
|
63
|
+
localAppProjectionError('music audio facts');
|
|
64
|
+
if (!Array.isArray(artifactsValue) || artifactsValue.length !== (record.generatedScore ? 2 : 1))
|
|
65
|
+
localAppProjectionError('music artifact set');
|
|
66
|
+
const artifacts = artifactsValue.map(asRecord);
|
|
67
|
+
const mix = artifacts.find((artifact) => artifact?.artifactId === record.mixArtifactId);
|
|
68
|
+
if (!mix || mix.mimeType !== 'audio/wav' || mix.sampleRateHz !== info.sampleRateHz || mix.channels !== info.channels || mix.frameCount !== info.frameCount
|
|
69
|
+
|| mix.durationMs !== info.durationMs || !uint(mix.sizeBytes, info.frameCount * info.channels * 4 + 56, 512 * 1024 * 1024))
|
|
70
|
+
localAppProjectionError('music mix facts');
|
|
71
|
+
if (record.generatedScore !== undefined) {
|
|
72
|
+
const score = asRecord(record.generatedScore);
|
|
73
|
+
assertExactProjectionKeys(score, ['artifactId', 'format', 'origin', 'truncated'], 'generated score');
|
|
74
|
+
if (!score || !identifier(score.artifactId) || score.artifactId === record.mixArtifactId || score.format !== 'abc'
|
|
75
|
+
|| score.origin !== 'generated-plan' || typeof score.truncated !== 'boolean')
|
|
76
|
+
localAppProjectionError('generated score');
|
|
77
|
+
const artifact = artifacts.find((entry) => entry?.artifactId === score.artifactId);
|
|
78
|
+
if (!artifact || artifact.mimeType !== 'text/vnd.abc' || !uint(artifact.sizeBytes, 1, 1048576))
|
|
79
|
+
localAppProjectionError('generated score artifact');
|
|
80
|
+
}
|
|
81
|
+
return Object.freeze(value);
|
|
82
|
+
}
|
|
83
|
+
export function runtimeMusicGenerateSpec(spec) {
|
|
84
|
+
return {
|
|
85
|
+
prompt: spec.prompt, lyrics: spec.lyrics, durationSeconds: spec.durationSeconds ?? 0,
|
|
86
|
+
instrumental: spec.instrumental ?? false, seed: spec.seed, negativePrompt: '', style: '', title: '',
|
|
87
|
+
returnGeneratedScore: spec.returnGeneratedScore ?? false,
|
|
88
|
+
score: spec.score ? { artifactId: spec.score.artifactId, format: spec.score.format === 'abc' ? MusicScoreFormat.ABC : MusicScoreFormat.MIDI } : undefined,
|
|
89
|
+
scoreConditioning: spec.scoreConditioning === 'melody-only' ? MusicScoreConditioning.MELODY_ONLY : spec.scoreConditioning === 'melody-and-harmony' ? MusicScoreConditioning.MELODY_AND_HARMONY : MusicScoreConditioning.UNSPECIFIED,
|
|
90
|
+
audioReference: spec.audioReference ? { artifactId: spec.audioReference.artifactId, range: spec.audioReference.range ? { startFrame: String(spec.audioReference.range.startFrame), endFrame: String(spec.audioReference.range.endFrame) } : undefined } : undefined,
|
|
91
|
+
videoReference: spec.videoReference ? { artifactId: spec.videoReference.artifactId } : undefined,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export function localMusicGenerateSpec(spec) {
|
|
95
|
+
if (spec.negativePrompt || spec.style || spec.title)
|
|
96
|
+
inputError();
|
|
97
|
+
const format = spec.score?.format === MusicScoreFormat.ABC ? 'abc' : spec.score?.format === MusicScoreFormat.MIDI ? 'midi' : undefined;
|
|
98
|
+
const conditioning = spec.scoreConditioning === MusicScoreConditioning.MELODY_ONLY ? 'melody-only' : spec.scoreConditioning === MusicScoreConditioning.MELODY_AND_HARMONY ? 'melody-and-harmony' : undefined;
|
|
99
|
+
if ((spec.score && !format) || (!conditioning && spec.scoreConditioning !== MusicScoreConditioning.UNSPECIFIED))
|
|
100
|
+
inputError();
|
|
101
|
+
return validateNimiLocalAppMusicGenerateSpec({
|
|
102
|
+
type: 'music-generate', prompt: spec.prompt, lyrics: spec.lyrics,
|
|
103
|
+
...(spec.durationSeconds ? { durationSeconds: spec.durationSeconds } : {}), instrumental: spec.instrumental,
|
|
104
|
+
...(spec.seed !== undefined ? { seed: spec.seed } : {}), returnGeneratedScore: spec.returnGeneratedScore,
|
|
105
|
+
...(spec.score ? { score: { artifactId: spec.score.artifactId, format } } : {}),
|
|
106
|
+
...(conditioning ? { scoreConditioning: conditioning } : {}),
|
|
107
|
+
...(spec.audioReference ? { audioReference: { artifactId: spec.audioReference.artifactId,
|
|
108
|
+
...(spec.audioReference.range ? { range: { startFrame: Number(spec.audioReference.range.startFrame), endFrame: Number(spec.audioReference.range.endFrame) } } : {}) } } : {}),
|
|
109
|
+
...(spec.videoReference ? { videoReference: { artifactId: spec.videoReference.artifactId } } : {}),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
export function localMusicGeneration(value) {
|
|
113
|
+
return {
|
|
114
|
+
mixArtifactId: value.mixArtifactId,
|
|
115
|
+
termination: { [MusicGenerationTermination.UNKNOWN]: 'unknown', [MusicGenerationTermination.MODEL_END]: 'model-end', [MusicGenerationTermination.BUDGET_LIMIT]: 'budget-limit' }[value.termination],
|
|
116
|
+
...(value.actualSeed !== undefined ? { actualSeed: value.actualSeed } : {}),
|
|
117
|
+
audioInfo: value.audioInfo ? { ...value.audioInfo, frameCount: Number(value.audioInfo.frameCount), durationMs: Number(value.audioInfo.durationMs) } : undefined,
|
|
118
|
+
...(value.generatedScore ? { generatedScore: { artifactId: value.generatedScore.artifactId, truncated: value.generatedScore.truncated,
|
|
119
|
+
format: value.generatedScore.format === MusicScoreFormat.ABC ? 'abc' : value.generatedScore.format === MusicScoreFormat.MIDI ? 'midi' : undefined,
|
|
120
|
+
origin: value.generatedScore.origin === MusicScoreOrigin.GENERATED_PLAN ? 'generated-plan' : value.generatedScore.origin === MusicScoreOrigin.TRANSCRIBED_ESTIMATE ? 'transcribed-estimate' : undefined } } : {}),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export function runtimeMusicGeneration(value) {
|
|
124
|
+
if (!value)
|
|
125
|
+
return undefined;
|
|
126
|
+
return {
|
|
127
|
+
mixArtifactId: value.mixArtifactId, actualSeed: value.actualSeed,
|
|
128
|
+
termination: { unknown: MusicGenerationTermination.UNKNOWN, 'model-end': MusicGenerationTermination.MODEL_END, 'budget-limit': MusicGenerationTermination.BUDGET_LIMIT }[value.termination],
|
|
129
|
+
audioInfo: { ...value.audioInfo, frameCount: String(value.audioInfo.frameCount), durationMs: String(value.audioInfo.durationMs) },
|
|
130
|
+
generatedScore: value.generatedScore ? { ...value.generatedScore,
|
|
131
|
+
format: value.generatedScore.format === 'abc' ? MusicScoreFormat.ABC : MusicScoreFormat.MIDI,
|
|
132
|
+
origin: value.generatedScore.origin === 'generated-plan' ? MusicScoreOrigin.GENERATED_PLAN : MusicScoreOrigin.TRANSCRIBED_ESTIMATE } : undefined,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=local-app-music.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-app-music.js","sourceRoot":"","sources":["../../../core/app/local-app-music.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAAE,eAAe,EAAE,yBAAyB,EAAE,aAAa,EAAE,uBAAuB,GAC7F,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,0BAA0B,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,gBAAgB,GAEvF,MAAM,8CAA8C,CAAC;AAsCtD,MAAM,UAAU,GAAG,GAAU,EAAE,CAAC,aAAa,CAAC,gCAAgC,EAAE,6BAA6B,EAAE,WAAW,C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CAAC,IAAI;YAC5F,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,SAAS;KACnJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { NimiAppActivityChange, NimiAppActivityFilter, NimiAppActivityRecord, NimiLocalAppActivityClient } from './local-app-runtime-platform-activity.js';
|
|
2
|
+
export type NimiAppActivityViewStatus = 'loading' | 'ready' | 'unavailable';
|
|
3
|
+
export type NimiAppActivityViewSnapshot = Readonly<{
|
|
4
|
+
status: NimiAppActivityViewStatus;
|
|
5
|
+
/** Records currently matching the view filter, newest first. */
|
|
6
|
+
records: readonly NimiAppActivityRecord[];
|
|
7
|
+
/** True once every page of the current baseline has been merged. */
|
|
8
|
+
complete: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* True when listing paused at the `maxRecords` bound while older pages of
|
|
11
|
+
* the same baseline remain; `loadMore` continues it. The records are then a
|
|
12
|
+
* truncated projection and never the complete set.
|
|
13
|
+
*/
|
|
14
|
+
hasMore: boolean;
|
|
15
|
+
error: unknown;
|
|
16
|
+
}>;
|
|
17
|
+
export type NimiAppActivityViewOptions = {
|
|
18
|
+
readonly activity: Pick<NimiLocalAppActivityClient, 'list' | 'subscribe'>;
|
|
19
|
+
readonly filter?: NimiAppActivityFilter;
|
|
20
|
+
readonly pageSize?: number;
|
|
21
|
+
/** Records merged per listing step; listing pauses with `hasMore` once reached. */
|
|
22
|
+
readonly maxRecords?: number;
|
|
23
|
+
readonly onUpdate: (snapshot: NimiAppActivityViewSnapshot) => void;
|
|
24
|
+
};
|
|
25
|
+
export type NimiAppActivityView = {
|
|
26
|
+
readonly start: () => void;
|
|
27
|
+
readonly stop: () => Promise<void>;
|
|
28
|
+
readonly relist: () => void;
|
|
29
|
+
/** Continues a paused listing of the same baseline by up to another `maxRecords` records. */
|
|
30
|
+
readonly loadMore: () => void;
|
|
31
|
+
readonly snapshot: () => NimiAppActivityViewSnapshot;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Pure merge state: highest change sequence per id wins, filter membership is
|
|
35
|
+
* evaluated after the merge, and removed or filtered-out ids keep their
|
|
36
|
+
* highest sequence so an older page or in-flight change cannot resurrect or
|
|
37
|
+
* regress them. The state lives for one listing baseline only.
|
|
38
|
+
*/
|
|
39
|
+
export declare class NimiAppActivityMergeState {
|
|
40
|
+
private readonly filter;
|
|
41
|
+
private readonly records;
|
|
42
|
+
private readonly retired;
|
|
43
|
+
constructor(filter?: NimiAppActivityFilter);
|
|
44
|
+
private highest;
|
|
45
|
+
/** Merges a listed or changed projection; returns true when visible state changed. */
|
|
46
|
+
mergeRecord(record: NimiAppActivityRecord): boolean;
|
|
47
|
+
mergeRemove(activityId: string, changeSeq: string): boolean;
|
|
48
|
+
mergeChange(change: NimiAppActivityChange): boolean;
|
|
49
|
+
list(): readonly NimiAppActivityRecord[];
|
|
50
|
+
}
|
|
51
|
+
export declare function matchesNimiAppActivityFilter(record: NimiAppActivityRecord, filter: NimiAppActivityFilter): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Maintains one filtered activity projection from the public list and
|
|
54
|
+
* subscribe operations. It never marks records read. A new filter requires a
|
|
55
|
+
* new view. Any ended or failed subscription, including an expired cursor,
|
|
56
|
+
* is recovered by a fresh listing baseline.
|
|
57
|
+
*/
|
|
58
|
+
export declare function createNimiAppActivityView(options: NimiAppActivityViewOptions): NimiAppActivityView;
|
|
59
|
+
//# sourceMappingURL=local-app-runtime-platform-activity-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-app-runtime-platform-activity-view.d.ts","sourceRoot":"","sources":["../../../core/app/local-app-runtime-platform-activity-view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,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;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;gBAExB,MAAM,GAAE,qBAA0B;IAE/D,OAAO,CAAC,OAAO;IAOf,sFAAsF;IACtF,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAanD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAQ3D,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAMnD,IAAI,IAAI,SAAS,qBAAqB,EAAE;CAKzC;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CASlH;AAaD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,GAAG,mBAAmB,CAiLlG"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { extractNimiErrorFields } from '../../types/errors.js';
|
|
2
|
+
const cursorValue = (value) => BigInt(value);
|
|
3
|
+
/**
|
|
4
|
+
* Pure merge state: highest change sequence per id wins, filter membership is
|
|
5
|
+
* evaluated after the merge, and removed or filtered-out ids keep their
|
|
6
|
+
* highest sequence so an older page or in-flight change cannot resurrect or
|
|
7
|
+
* regress them. The state lives for one listing baseline only.
|
|
8
|
+
*/
|
|
9
|
+
export class NimiAppActivityMergeState {
|
|
10
|
+
filter;
|
|
11
|
+
records = new Map();
|
|
12
|
+
retired = new Map();
|
|
13
|
+
constructor(filter = {}) {
|
|
14
|
+
this.filter = filter;
|
|
15
|
+
}
|
|
16
|
+
highest(activityId) {
|
|
17
|
+
const current = this.records.get(activityId);
|
|
18
|
+
const retired = this.retired.get(activityId);
|
|
19
|
+
const candidates = [current ? cursorValue(current.changeSeq) : -1n, retired ?? -1n];
|
|
20
|
+
return candidates[0] > candidates[1] ? candidates[0] : candidates[1];
|
|
21
|
+
}
|
|
22
|
+
/** Merges a listed or changed projection; returns true when visible state changed. */
|
|
23
|
+
mergeRecord(record) {
|
|
24
|
+
const seq = cursorValue(record.changeSeq);
|
|
25
|
+
if (seq <= this.highest(record.activityId))
|
|
26
|
+
return false;
|
|
27
|
+
if (matchesNimiAppActivityFilter(record, this.filter)) {
|
|
28
|
+
this.records.set(record.activityId, record);
|
|
29
|
+
this.retired.delete(record.activityId);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
const wasVisible = this.records.delete(record.activityId);
|
|
33
|
+
this.retired.set(record.activityId, seq);
|
|
34
|
+
return wasVisible;
|
|
35
|
+
}
|
|
36
|
+
mergeRemove(activityId, changeSeq) {
|
|
37
|
+
const seq = cursorValue(changeSeq);
|
|
38
|
+
if (seq <= this.highest(activityId))
|
|
39
|
+
return false;
|
|
40
|
+
const wasVisible = this.records.delete(activityId);
|
|
41
|
+
this.retired.set(activityId, seq);
|
|
42
|
+
return wasVisible;
|
|
43
|
+
}
|
|
44
|
+
mergeChange(change) {
|
|
45
|
+
return change.kind === 'upsert'
|
|
46
|
+
? this.mergeRecord(change.record)
|
|
47
|
+
: this.mergeRemove(change.activityId, change.changeSeq);
|
|
48
|
+
}
|
|
49
|
+
list() {
|
|
50
|
+
return [...this.records.values()].sort((left, right) => (right.occurredAt.localeCompare(left.occurredAt) || right.activityId.localeCompare(left.activityId)));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export function matchesNimiAppActivityFilter(record, filter) {
|
|
54
|
+
if (filter.sourceRef !== undefined && record.source.sourceRef !== filter.sourceRef)
|
|
55
|
+
return false;
|
|
56
|
+
if (filter.kind !== undefined && record.kind !== filter.kind)
|
|
57
|
+
return false;
|
|
58
|
+
if (filter.todoStates !== undefined && filter.todoStates.length > 0 &&
|
|
59
|
+
(record.todoState === null || !filter.todoStates.includes(record.todoState)))
|
|
60
|
+
return false;
|
|
61
|
+
if (filter.agentRef !== undefined && record.agent?.agentRef !== filter.agentRef)
|
|
62
|
+
return false;
|
|
63
|
+
if (filter.occurredAfter !== undefined && Date.parse(record.occurredAt) < Date.parse(filter.occurredAfter))
|
|
64
|
+
return false;
|
|
65
|
+
if (filter.occurredBefore !== undefined && Date.parse(record.occurredAt) >= Date.parse(filter.occurredBefore))
|
|
66
|
+
return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
function cursorProblem(error) {
|
|
70
|
+
if (!error || typeof error !== 'object')
|
|
71
|
+
return false;
|
|
72
|
+
const record = error;
|
|
73
|
+
return [record.code, record.reasonCode].some((value) => {
|
|
74
|
+
const token = String(value ?? '').toLowerCase();
|
|
75
|
+
return token === 'invalid-cursor' || token === 'app_activity_cursor_expired' || token === 'app_activity_page_token_invalid';
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
// @nimi-authority: rule.nimi.platform.core-protocol.p-actv-003
|
|
79
|
+
// @nimi-authority: rule.nimi.sdks.feature-clients.r113
|
|
80
|
+
/**
|
|
81
|
+
* Maintains one filtered activity projection from the public list and
|
|
82
|
+
* subscribe operations. It never marks records read. A new filter requires a
|
|
83
|
+
* new view. Any ended or failed subscription, including an expired cursor,
|
|
84
|
+
* is recovered by a fresh listing baseline.
|
|
85
|
+
*/
|
|
86
|
+
export function createNimiAppActivityView(options) {
|
|
87
|
+
const filter = options.filter ?? {};
|
|
88
|
+
const pageSize = options.pageSize ?? 100;
|
|
89
|
+
const maxRecords = options.maxRecords ?? 500;
|
|
90
|
+
let generation = 0;
|
|
91
|
+
let state = new NimiAppActivityMergeState(filter);
|
|
92
|
+
let current = { status: 'loading', complete: false, hasMore: false, error: null };
|
|
93
|
+
let subscription;
|
|
94
|
+
let retryTimer;
|
|
95
|
+
let running = false;
|
|
96
|
+
let failures = 0;
|
|
97
|
+
// The paused continuation of the current listing baseline, if any.
|
|
98
|
+
let continuation = null;
|
|
99
|
+
let pagingGeneration = 0;
|
|
100
|
+
const publish = () => {
|
|
101
|
+
options.onUpdate(Object.freeze({ ...current, records: Object.freeze(state.list()) }));
|
|
102
|
+
};
|
|
103
|
+
const closeSubscription = async () => {
|
|
104
|
+
const active = subscription;
|
|
105
|
+
subscription = undefined;
|
|
106
|
+
await active?.cancel().catch(() => undefined);
|
|
107
|
+
};
|
|
108
|
+
const scheduleRetry = (action, delayMs) => {
|
|
109
|
+
if (!running)
|
|
110
|
+
return;
|
|
111
|
+
if (retryTimer !== undefined)
|
|
112
|
+
clearTimeout(retryTimer);
|
|
113
|
+
retryTimer = setTimeout(() => {
|
|
114
|
+
retryTimer = undefined;
|
|
115
|
+
if (running)
|
|
116
|
+
action();
|
|
117
|
+
}, delayMs);
|
|
118
|
+
};
|
|
119
|
+
const follow = async (listingGeneration, afterChangeSeq) => {
|
|
120
|
+
let openedAt;
|
|
121
|
+
let expired = false;
|
|
122
|
+
try {
|
|
123
|
+
const active = await options.activity.subscribe({ afterChangeSeq });
|
|
124
|
+
if (!running || listingGeneration !== generation) {
|
|
125
|
+
await active.cancel().catch(() => undefined);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
subscription = active;
|
|
129
|
+
openedAt = Date.now();
|
|
130
|
+
for await (const change of active) {
|
|
131
|
+
if (!running || listingGeneration !== generation)
|
|
132
|
+
return;
|
|
133
|
+
if (state.mergeChange(change))
|
|
134
|
+
publish();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (!running || listingGeneration !== generation)
|
|
139
|
+
return;
|
|
140
|
+
if (cursorProblem(error))
|
|
141
|
+
expired = true;
|
|
142
|
+
else
|
|
143
|
+
current = { ...current, error };
|
|
144
|
+
}
|
|
145
|
+
if (!running || listingGeneration !== generation)
|
|
146
|
+
return;
|
|
147
|
+
// The ended stream may belong to a previous account. Invalidate pending
|
|
148
|
+
// pages and clear its projection before waiting for a new baseline.
|
|
149
|
+
generation += 1;
|
|
150
|
+
state = new NimiAppActivityMergeState(filter);
|
|
151
|
+
continuation = null;
|
|
152
|
+
current = { status: current.error ? 'unavailable' : 'loading', complete: false, hasMore: false, error: current.error };
|
|
153
|
+
void closeSubscription();
|
|
154
|
+
publish();
|
|
155
|
+
if (current.error && extractNimiErrorFields(current.error).retryable === false)
|
|
156
|
+
return;
|
|
157
|
+
// Change cursors are not bound to an account, and an ended subscription
|
|
158
|
+
// may belong to a session that was replaced by another account or a
|
|
159
|
+
// restarted Runtime. Recovery therefore starts a fresh listing baseline
|
|
160
|
+
// instead of replaying from the last processed change.
|
|
161
|
+
// A long-lived subscription that ends starts a new backoff series.
|
|
162
|
+
failures = openedAt !== undefined && Date.now() - openedAt >= 30_000 ? 1 : failures + 1;
|
|
163
|
+
// A first expired cursor is an explicit relist requirement, not a fault.
|
|
164
|
+
const delay = expired && failures === 1 ? 0 : Math.min(250 * 2 ** (failures - 1), 5_000);
|
|
165
|
+
scheduleRetry(() => startListing({ background: current.error !== null }), delay);
|
|
166
|
+
};
|
|
167
|
+
// Merges continuation pages of one baseline until the step budget is spent;
|
|
168
|
+
// a remaining token pauses the listing with hasMore instead of claiming it
|
|
169
|
+
// complete.
|
|
170
|
+
const continueListing = async (listingGeneration, token, budget) => {
|
|
171
|
+
pagingGeneration = listingGeneration;
|
|
172
|
+
try {
|
|
173
|
+
let next = token;
|
|
174
|
+
let merged = 0;
|
|
175
|
+
while (next !== null && merged < budget) {
|
|
176
|
+
const page = await options.activity.list({ filter, pageSize, pageToken: next });
|
|
177
|
+
if (!running || listingGeneration !== generation)
|
|
178
|
+
return;
|
|
179
|
+
for (const record of page.records)
|
|
180
|
+
state.mergeRecord(record);
|
|
181
|
+
merged += page.records.length;
|
|
182
|
+
next = page.nextPageToken;
|
|
183
|
+
if (next !== null)
|
|
184
|
+
publish();
|
|
185
|
+
}
|
|
186
|
+
continuation = next === null ? null : { generation: listingGeneration, token: next };
|
|
187
|
+
current = { ...current, complete: next === null, hasMore: next !== null, error: null };
|
|
188
|
+
publish();
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
if (pagingGeneration === listingGeneration)
|
|
192
|
+
pagingGeneration = 0;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const startListing = ({ keepVisible = false, background = false } = {}) => {
|
|
196
|
+
if (retryTimer !== undefined)
|
|
197
|
+
clearTimeout(retryTimer);
|
|
198
|
+
retryTimer = undefined;
|
|
199
|
+
generation += 1;
|
|
200
|
+
const listingGeneration = generation;
|
|
201
|
+
const next = new NimiAppActivityMergeState(filter);
|
|
202
|
+
// A relist may keep the previous projection visible until its first page
|
|
203
|
+
// arrives; the projection is replaced, never merged, with the new baseline.
|
|
204
|
+
if (!keepVisible)
|
|
205
|
+
state = next;
|
|
206
|
+
// Automatic recovery keeps the read failure visible until a new baseline
|
|
207
|
+
// succeeds. Returning to initial loading on every retry makes consumers
|
|
208
|
+
// repeatedly remove their error/empty state and flash a loading skeleton.
|
|
209
|
+
if (!background)
|
|
210
|
+
current = { status: 'loading', complete: false, hasMore: false, error: null };
|
|
211
|
+
continuation = null;
|
|
212
|
+
void closeSubscription();
|
|
213
|
+
if (!background)
|
|
214
|
+
publish();
|
|
215
|
+
void (async () => {
|
|
216
|
+
try {
|
|
217
|
+
const first = await options.activity.list({ filter, pageSize });
|
|
218
|
+
if (!running || listingGeneration !== generation)
|
|
219
|
+
return;
|
|
220
|
+
state = next;
|
|
221
|
+
for (const record of first.records)
|
|
222
|
+
state.mergeRecord(record);
|
|
223
|
+
current = { status: 'ready', complete: first.nextPageToken === null, hasMore: false, error: null };
|
|
224
|
+
publish();
|
|
225
|
+
void follow(listingGeneration, first.baselineChangeSeq);
|
|
226
|
+
if (first.nextPageToken !== null) {
|
|
227
|
+
await continueListing(listingGeneration, first.nextPageToken, maxRecords - first.records.length);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
if (!running || listingGeneration !== generation)
|
|
232
|
+
return;
|
|
233
|
+
// Without a current listing the previous projection may belong to a
|
|
234
|
+
// session that no longer exists; drop it rather than show it as current.
|
|
235
|
+
state = new NimiAppActivityMergeState(filter);
|
|
236
|
+
current = { status: 'unavailable', complete: false, hasMore: false, error };
|
|
237
|
+
continuation = null;
|
|
238
|
+
publish();
|
|
239
|
+
if (extractNimiErrorFields(error).retryable !== false) {
|
|
240
|
+
scheduleRetry(() => startListing({ background: true }), 3_000);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
})();
|
|
244
|
+
};
|
|
245
|
+
const loadMore = () => {
|
|
246
|
+
const paused = continuation;
|
|
247
|
+
if (!running || !paused || paused.generation !== generation || pagingGeneration === generation)
|
|
248
|
+
return;
|
|
249
|
+
void continueListing(paused.generation, paused.token, maxRecords).catch((error) => {
|
|
250
|
+
if (!running || paused.generation !== generation)
|
|
251
|
+
return;
|
|
252
|
+
// A continuation that no longer belongs to this account or baseline
|
|
253
|
+
// requires a fresh listing; other failures keep the paused position.
|
|
254
|
+
if (cursorProblem(error)) {
|
|
255
|
+
startListing({ keepVisible: true });
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
current = { ...current, error };
|
|
259
|
+
publish();
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
return Object.freeze({
|
|
263
|
+
start: () => {
|
|
264
|
+
if (running)
|
|
265
|
+
return;
|
|
266
|
+
running = true;
|
|
267
|
+
startListing();
|
|
268
|
+
},
|
|
269
|
+
stop: async () => {
|
|
270
|
+
running = false;
|
|
271
|
+
generation += 1;
|
|
272
|
+
if (retryTimer !== undefined)
|
|
273
|
+
clearTimeout(retryTimer);
|
|
274
|
+
retryTimer = undefined;
|
|
275
|
+
await closeSubscription();
|
|
276
|
+
},
|
|
277
|
+
relist: () => {
|
|
278
|
+
if (running)
|
|
279
|
+
startListing({ keepVisible: true });
|
|
280
|
+
},
|
|
281
|
+
loadMore,
|
|
282
|
+
snapshot: () => Object.freeze({ ...current, records: Object.freeze(state.list()) }),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=local-app-runtime-platform-activity-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-app-runtime-platform-activity-view.js","s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